Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 82c3ffe

Browse files
fix(scripts): Generate semver tag within post-release.sh (#263)
This commit modifies post-release.sh to auto-generate a semver tag based on the highest tagged version of material-components-web by lerna. E.g., 'material-components-web@0.4.0' would be translated into a `v0.4.0` repo tag. This mainly addresses the issue where standard-changelog fails to generate a correct changelog due to lack of semver tags. However, having an auto-generated semver tag for the _entire_ repo seems useful both for automated tools relying on semver, and also for non-automated humans looking to get a general worldview of our latest release :) Fixes #209 [ci skip]
1 parent 8a14374 commit 82c3ffe

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

scripts/post-release.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,11 @@ git add CHANGELOG.md
2828
git commit -m "docs: Update CHANGELOG.md"
2929
echo ""
3030

31-
log "Done! You should now git push to master"
31+
# Extract repo version from material-components-web@Maj.min.patch tag generated by lerna
32+
REPO_VERSION=$($(npm bin)/semver $(git tag -l | grep material-components-web | sed 's/material-components-web@//') | tail -n 1)
33+
SEMVER_TAG="v$REPO_VERSION"
34+
log "Tagging repo using semver tag $SEMVER_TAG"
35+
git tag $SEMVER_TAG -m "Material Components for the web release $SEMVER_TAG"
36+
echo ""
37+
38+
log "Done! You should now git push to master and git push --tags"

0 commit comments

Comments
 (0)