-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
current_version=$(git describe --tags --abbrev=0) | ||
if [ "$1" == "" ]; then | ||
echo | ||
echo "Syntax: $0 {new_version}" | ||
echo | ||
else | ||
echo "Current version: ($current_version)" | ||
echo "New version : ($1)" | ||
echo -n "Do you want to proceed ? " | ||
read a | ||
if [ "$a" == "y" ]; then | ||
echo "Doing this..." | ||
grep $current_version library.properties | ||
if [ "$?" == "0" ]; then | ||
sed -i "s/$current_version/$1/" library.properties | ||
sed -i "s/$current_version/$1/" library.json | ||
git tag $1 | ||
git add library.properties | ||
git add library.json | ||
git commit -m "Release $1" | ||
git push | ||
git push --tags | ||
else | ||
echo "Current version does not match library.property version, aborting" | ||
fi | ||
fi | ||
fi |
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