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

Commit

Permalink
fix(scripts): Generate semver tag within post-release.sh (#263)
Browse files Browse the repository at this point in the history
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.,
'[email protected]' 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]
  • Loading branch information
traviskaufman authored Feb 7, 2017
1 parent 8a14374 commit 82c3ffe
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/post-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,11 @@ git add CHANGELOG.md
git commit -m "docs: Update CHANGELOG.md"
echo ""

log "Done! You should now git push to master"
# Extract repo version from [email protected] tag generated by lerna
REPO_VERSION=$($(npm bin)/semver $(git tag -l | grep material-components-web | sed 's/material-components-web@//') | tail -n 1)
SEMVER_TAG="v$REPO_VERSION"
log "Tagging repo using semver tag $SEMVER_TAG"
git tag $SEMVER_TAG -m "Material Components for the web release $SEMVER_TAG"
echo ""

log "Done! You should now git push to master and git push --tags"

0 comments on commit 82c3ffe

Please sign in to comment.