We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b338fc8 commit a253951Copy full SHA for a253951
1 file changed
.github/workflows/release.yml
@@ -57,8 +57,10 @@ jobs:
57
# build-release.js does the same replacement for npm publish,
58
# but we use sed here to keep the binary build independent.
59
TAG="${GITHUB_REF#refs/tags/}"
60
- echo "Injecting version: ${TAG}"
61
- sed -i "s/const programVersion = '\[dev\]'/const programVersion = '${TAG}'/" cli.mjs
+ SHA=$(git rev-parse --short HEAD)
+ VERSION="${TAG} (${SHA})"
62
+ echo "Injecting version: ${VERSION}"
63
+ sed -i "s/const programVersion = '\[dev\]'/const programVersion = '${VERSION}'/" cli.mjs
64
65
# Sanity check: make sure the replacement actually worked
66
grep "programVersion" cli.mjs
0 commit comments