From ad1e8671d70176194b4f0e067fc6c6484f9a0728 Mon Sep 17 00:00:00 2001 From: Jonathan Cubides Date: Thu, 2 Jul 2026 12:43:23 -0500 Subject: [PATCH] fix(justfile): guard contracts-publish against non-semver version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `just contracts-publish --dry-run` bound `--dry-run` to the required `version` arg and ran `forge soldeer push anoma-forwarder-bases~--dry-run` — a real push with a garbage version. Validate that version is semver and fail fast with a usage hint that flags go after the version. --- justfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index 80109df..7209b8a 100644 --- a/justfile +++ b/justfile @@ -73,8 +73,10 @@ contracts-gen-bindings: --module \ --overwrite -# Publish contracts +# Publish contracts to soldeer. VERSION must be semver (e.g. 1.2.0). +# Flags such as --dry-run go AFTER the version: `just contracts-publish 1.2.0 --dry-run`. contracts-publish version *args: + @[[ "{{version}}" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+ ]] || { echo "error: invalid version '{{version}}'. Expected semver like 1.2.0. Usage: just contracts-publish [flags] (put --dry-run AFTER the version)." >&2; exit 1; } cd contracts && forge soldeer push anoma-forwarder-bases~{{version}} {{ args }} # --- Bindings ---