aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2024-10-30 08:31:48 -0500
committerMatt Strapp <matt@mattstrapp.net>2024-10-30 08:31:48 -0500
commit9a202109e07b18ac63444c6d016495b0ddf6b4f4 (patch)
tree706e76d118ed0ba231e81d2bc7f0357272eadecc
parentadd global eslintrc (diff)
downloadlocusts-9a202109e07b18ac63444c6d016495b0ddf6b4f4.tar
locusts-9a202109e07b18ac63444c6d016495b0ddf6b4f4.tar.gz
locusts-9a202109e07b18ac63444c6d016495b0ddf6b4f4.tar.bz2
locusts-9a202109e07b18ac63444c6d016495b0ddf6b4f4.tar.lz
locusts-9a202109e07b18ac63444c6d016495b0ddf6b4f4.tar.xz
locusts-9a202109e07b18ac63444c6d016495b0ddf6b4f4.tar.zst
locusts-9a202109e07b18ac63444c6d016495b0ddf6b4f4.zip
make sure to tag repo when running changeset publish
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
-rw-r--r--README.md3
-rwxr-xr-xcontrib/tag-repo23
-rwxr-xr-x[-rw-r--r--]contrib/version-bump17
-rw-r--r--package.json2
4 files changed, 26 insertions, 19 deletions
diff --git a/README.md b/README.md
index 29c67e0..b7d5ec6 100644
--- a/README.md
+++ b/README.md
@@ -21,12 +21,11 @@ We here at Locusts-R-Us have developed a series of libraries for all sorts of pr
[![go.mod Version](https://img.shields.io/github/go-mod/go-version/locusts-r-us/locusts?style=for-the-badge&logo=go&color=%2300ADD8)](https://pkg.go.dev/github.com/locusts-r-us/locusts)
[![Hex.pm Version](https://img.shields.io/hexpm/v/locusts?style=for-the-badge&logo=elixir&color=%234B275F)](https://hex.pm/packages/locusts)
[![JSR Version](https://img.shields.io/jsr/v/%40locusts-r-us/locusts?style=for-the-badge&logo=jsr&color=%23F7DF1E)](https://jsr.io/@locusts-r-us/locusts)
-[![Maven Central Version](https://img.shields.io/maven-central/v/io.github.locusts-r-us/locusts?style=for-the-badge&logo=apachemaven&color=%23C71A36)](https://search.maven.org/artifact/io.github.locusts-r-us/locusts)
+[![Maven Central Version](https://img.shields.io/maven-central/v/io.github.locusts-r-us/locusts?style=for-the-badge&logo=apachemaven&color=%23C71A36)](https://github.com/locusts-r-us/locusts/issues/32)
[![npm Version](https://img.shields.io/npm/v/locusts?style=for-the-badge&logo=npm&color=%23cb3837)](https://www.npmjs.com/package/locusts)
[![NuGet Version](https://img.shields.io/nuget/v/locusts?style=for-the-badge&logo=nuget&color=%23004880)](https://www.nuget.org/packages/locusts)
[![PyPI Version](https://img.shields.io/pypi/v/locusts-r-us?style=for-the-badge&logo=pypi&label=pypi&color=%233775A9)](https://pypi.org/project/locusts-r-us/)
-
## FAQ
### Why the name `Locusts`?
diff --git a/contrib/tag-repo b/contrib/tag-repo
new file mode 100755
index 0000000..09ca6a9
--- /dev/null
+++ b/contrib/tag-repo
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+
+if [ -z "$GIT_TAG" ]; then
+ echo "GIT_TAG is not set, pulling 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 "$(pwd)" | xargs sed -i "s/$OLD_TAG/$GIT_TAG/g"
+
+# fiddle with autotools
+AUTOTOOLS_TAG=${GIT_TAG//\./:}
+OLD_TAG=${OLD_TAG//\./:}
+
+sed -i "s/$GIT_TAG/$AUTOTOOLS_TAG/g" GNUmakefile.am
+
+# remove the snapshot from gradle
+sed -i "s/-SNAPSHOT//g" gradle.properties
+
+# bump the main package.json too
+jq ".version = \"$GIT_TAG\"" package.json | sponge package.json \ No newline at end of file
diff --git a/contrib/version-bump b/contrib/version-bump
index 09ca6a9..fb0b930 100644..100755
--- a/contrib/version-bump
+++ b/contrib/version-bump
@@ -5,19 +5,4 @@ if [ -z "$GIT_TAG" ]; then
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 "$(pwd)" | xargs sed -i "s/$OLD_TAG/$GIT_TAG/g"
-
-# fiddle with autotools
-AUTOTOOLS_TAG=${GIT_TAG//\./:}
-OLD_TAG=${OLD_TAG//\./:}
-
-sed -i "s/$GIT_TAG/$AUTOTOOLS_TAG/g" GNUmakefile.am
-
-# remove the snapshot from gradle
-sed -i "s/-SNAPSHOT//g" gradle.properties
-
-# bump the main package.json too
-jq ".version = \"$GIT_TAG\"" package.json | sponge package.json \ No newline at end of file
+git tag v"$GIT_TAG"
diff --git a/package.json b/package.json
index e4e08c2..c3b2a39 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,7 @@
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"lint": "turbo lint",
"test": "turbo test",
- "publish-packages": "turbo build && changeset publish",
+ "publish-packages": "turbo build && bash ./contrib/tag-repo && changeset publish",
"versioning": "changeset version && bash ./contrib/version-bump"
}
}