Skip to content

Commit

Permalink
add a script to tag so i don't have to type always
Browse files Browse the repository at this point in the history
  • Loading branch information
rakheshster committed Jan 24, 2021
1 parent 460ad53 commit 97c0649
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions taggh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
# Usage ./taggh.sh
# Tag and push to GitHub

BUILDINFO="$(pwd)/buildinfo.json"
if ! [[ -r "$BUILDINFO" ]]; then echo "Cannot find $BUILDINFO file. Exiting ..."; exit 1; fi

if ! command -v jq &> /dev/null; then echo "Cannot find jq. Exiting ..."; exit 1; fi

VERSION=$(jq -r '.version' $BUILDINFO)
IMAGENAME=$(jq -r '.imagename' $BUILDINFO)

git tag -a ${VERSION} -m ${VERSION}
git push origin ${VERSION}

0 comments on commit 97c0649

Please sign in to comment.