aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/version-bump6
-rw-r--r--package.json2
2 files changed, 5 insertions, 3 deletions
diff --git a/contrib/version-bump b/contrib/version-bump
index c3f12bb..d398ce4 100644
--- a/contrib/version-bump
+++ b/contrib/version-bump
@@ -1,12 +1,14 @@
#!/usr/bin/env bash
if [ -z "$GIT_TAG" ]; then
- echo "GIT_TAG is not set"
- exit 1
+ echo "GIT_TAG is not set, guessing from changeset"
+ GIT_TAG=$(jq -r '.version' src/packages/locusts/package.json)
fi
OLD_TAG=$(jq -r '.version' package.json)
+echo "Bumping version from $OLD_TAG to $GIT_TAG"
+
rg "$OLD_TAG" --files-with-matches --iglob \!\*lock\* --iglob \!go.mod --iglob \!deno.json --iglob \!package.json --iglob \!\*.md | xargs sed -i "s/$OLD_TAG/$GIT_TAG/g"
# fiddle with autotools
diff --git a/package.json b/package.json
index 1ff6b46..e4e08c2 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,6 @@
"lint": "turbo lint",
"test": "turbo test",
"publish-packages": "turbo build && changeset publish",
- "versioning": "bash ./contrib/version-bump && changeset version"
+ "versioning": "changeset version && bash ./contrib/version-bump"
}
}