misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-02-11 18:18:25 +01:00
commit 12b15c3ce6
2 changed files with 27 additions and 10 deletions

27
release.sh Executable file
View file

@ -0,0 +1,27 @@
#!/bin/bash
# nothing to see here, just a utility i use to create new releases ^_^
CURRENT_VERSION=$(cat core/banner.go | grep Version | cut -d '"' -f 2)
TO_UPDATE=(
core/banner.go
)
echo -n "Current version is $CURRENT_VERSION, select new version: "
read NEW_VERSION
echo "Creating version $NEW_VERSION ...\n"
for file in "${TO_UPDATE[@]}"
do
echo "Patching $file ..."
sed -i "s/$CURRENT_VERSION/$NEW_VERSION/g" $file
git add $file
done
git commit -m "Releasing v$NEW_VERSION"
git push
git tag -a v$NEW_VERSION -m "Release v$NEW_VERSION"
git push origin v$NEW_VERSION
echo
echo "All done, v$NEW_VERSION released ^_^"