Created
February 1, 2024 18:38
-
-
Save speaud/e91cfffa72cb4dd72a2c4a89a9590aba to your computer and use it in GitHub Desktop.
NPM scripts to help with version tagging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"tag:create": "echo \"enter version to create: \" && read x && git tag $x $(git log -n 1 --pretty=format:\"%h\") && git push origin $x && sed -i -e \"s/\\\"version\\\": \\\"[0-9]*.[0-9]*.[0-9]*\\\"/\\\"version\\\": \\\"$x\\\"/g\" package.json && git add . && git commit -m \"Bump version\" && git push", | |
"tag:delete": "echo \"enter version to delete: \" && read y && git tag -d $y && git push --delete origin $y" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment