diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 0000000..d5d34b3 --- /dev/null +++ b/scripts/release.sh @@ -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 ^_^" diff --git a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/__init__.py b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/__init__.py index ff43494..dacb09c 100644 --- a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/__init__.py +++ b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/__init__.py @@ -1,7 +1,5 @@ import subprocess -version = '1.0.0a' - _name = None diff --git a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/version.py b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/version.py new file mode 100644 index 0000000..022e5cc --- /dev/null +++ b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/version.py @@ -0,0 +1 @@ +version = '1.0.0a'