Updated tag script
This commit is contained in:
parent
b332fd60f4
commit
7c05906c45
|
|
@ -11,4 +11,3 @@ npm-debug.log
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
.idea/
|
.idea/
|
||||||
.vagrant/
|
.vagrant/
|
||||||
.version
|
|
||||||
|
|
|
||||||
15
tag.sh
15
tag.sh
|
|
@ -1,17 +1,16 @@
|
||||||
RED='\033[0;31m'
|
#!/bin/bash
|
||||||
GREEN='\033[0;32m'
|
|
||||||
|
|
||||||
# Get the version
|
# Prompt the version
|
||||||
NEW_VERSION=$(cat .version)
|
read -p "Version: " version
|
||||||
|
|
||||||
# Check if the version already exists
|
# Check if the version already exists
|
||||||
if [ $(git tag -l "$NEW_VERSION") ]; then
|
if [ $(git tag -l "$version") ]; then
|
||||||
echo "${RED}Version already exists!"
|
echo "Version already exists!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create and push the tag
|
# Create and push the tag
|
||||||
git tag $NEW_VERSION
|
git tag $version
|
||||||
git push --tags
|
git push --tags
|
||||||
|
|
||||||
echo "${GREEN}Done."
|
echo "Done."
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue