Skip to content

Commit

Permalink
add script to up tags
Browse files Browse the repository at this point in the history
  • Loading branch information
vcptr committed Jun 4, 2020
1 parent 517f2f2 commit 509a78b
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
29 changes: 29 additions & 0 deletions uplatest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

COREREPO=$1
if [[ -z $COREREPO ]]; then
COREREPO=../core
fi

if [[ ! -d $COREREPO ]]; then
echo "$0 path/to/core/gitrepo"
exit 1
fi

pushd $COREREPO
LATESTHASH=$(git rev-parse --short HEAD)
popd
CURRHASH=$(cat ReleaseHash)

echo "Prev Rev: ${CURRHASH}, repo Hash: ${LATESTHASH}"

if [[ x${CURRHASH} == x${LATESTHASH} ]]; then
echo "they are the same"
exit 1;
fi

read -p "Update rev: ${LATESTHASH}? (y/n) " confirm
if [[ x$confirm == "xy" ]]; then
echo ${LATESTHASH} > ReleaseHash
fi

29 changes: 29 additions & 0 deletions uptag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

COREREPO=$1
if [[ -z $COREREPO ]]; then
COREREPO=../core
fi

if [[ ! -d $COREREPO ]]; then
echo "$0 path/to/core/gitrepo"
exit 1
fi

pushd $COREREPO
LATESTTAG=$(git describe --tags)
popd
CURRTAG=$(cat ReleaseTag)

echo "Prev Rev: ${CURRTAG}, repo Hash: ${LATESTTAG}"

if [[ x${CURRTAG} == x${LATESTTAG} ]]; then
echo "they are the same"
exit 1;
fi

read -p "Update rev: ${LATESTTAG}? (y/n) " confirm
if [[ x$confirm == "xy" ]]; then
echo ${LATESTTAG} > ReleaseTag
fi

0 comments on commit 509a78b

Please sign in to comment.