Files
version_verify/action.sh
Bryce Thorup f9d266449e
All checks were successful
Push to main / Reset-Version-Tag (push) Successful in 4s
git pull
2024-01-02 09:20:47 -07:00

15 lines
369 B
Bash
Executable File

apt update
apt install jq -y
CURRENT_VERSION=$(jq -r .version package.json)
echo $CURRENT_VERSION
git pull
PREVIOUS_VERSIONS=$(git tag)
echo $PREVIOUS_VERSIONS
git branch
if [[ $PREVIOUS_VERSIONS == *$CURRENT_VERSION* ]];
then
echo "Version $CURRENT_VERSION already tagged in this repository. Be sure to update version number, or delete existing tag."
return 1
fi