Created
November 18, 2020 18:20
-
-
Save kahunacohen/03a18173f03ca2e015157bce7a8583a9 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env bash | |
# Sets version in package.json, commits and pushes change, then tags pushes current branch | |
# This can be called after deploying the actual app. | |
# Args: | |
# - version: The version to deploy | |
# Usage: | |
# $ node_tag 0.1.0 | |
function node_tag { | |
jq ".version=\"$1\"" ./package.json > package.json.tmp && mv package.json.tmp package.json && \ | |
git commit ./package.json -m "Mutate version key in package.json to $1" && \ | |
git push && \ | |
git tag -a $1 -m "Tagged $1" && \ | |
git push --tags | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
function parse_ver {
local i=0
case $2 in
}