Skip to content

Commit

Permalink
Fixes #296
Browse files Browse the repository at this point in the history
  • Loading branch information
bigtimebuddy committed May 3, 2021
1 parent 6e9ab32 commit 0708481
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -35,7 +35,8 @@
"watch:tools": "lerna run watch --parallel --scope @tools/*",
"watch": "rollup -cw",
"prerelease": "run-s build",
"release": "lerna version --exact",
"release": "lerna version --exact --no-push --no-git-tag-version",
"postrelease": "./scripts/tag-release.sh",
"publish-ci": "lerna publish from-package --yes --no-verify-access"
},
"engines": {
Expand Down
21 changes: 21 additions & 0 deletions scripts/tag-release.sh
@@ -0,0 +1,21 @@
#!/bin/bash

# `lerna version` doesn't update package-lock.json for npm 7
# so we disable Lerna auto-tagging/pushing and do it ourself
# See https://github.com/lerna/lerna/issues/2891

# Get the tag from the lerna file
tag=v$(node -e "process.stdout.write(require('./lerna.json').version)");

# Update the package-lock.json
npm i --package-lock-only

# Update the previous commit
git commit --all -m ${tag}

# Replace the existing tag
git tag -a ${tag} -m ${tag}

# Push the changes
git push --tags
git push

0 comments on commit 0708481

Please sign in to comment.