release script

This commit is contained in:
Simone Margaritelli 2019-10-03 13:03:10 +02:00
parent 8c8bf77d1a
commit d4a45f1b43
3 changed files with 29 additions and 2 deletions

28
scripts/release.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
# nothing to see here, just a utility i use to create new releases ^_^
VERSION_FILE=$(dirname "${BASH_SOURCE[0]}")/../sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/version.py
echo "version file is $VERSION_FILE"
CURRENT_VERSION=$(cat $VERSION_FILE | grep version | cut -d '"' -f 2)
TO_UPDATE=(
$VERSION_FILE
)
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 ^_^"

View File

@ -1,7 +1,5 @@
import subprocess
version = '1.0.0a'
_name = None

View File

@ -0,0 +1 @@
version = '1.0.0a'