release script
This commit is contained in:
parent
8c8bf77d1a
commit
d4a45f1b43
28
scripts/release.sh
Executable file
28
scripts/release.sh
Executable 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 ^_^"
|
@ -1,7 +1,5 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
version = '1.0.0a'
|
|
||||||
|
|
||||||
_name = None
|
_name = None
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
version = '1.0.0a'
|
Loading…
x
Reference in New Issue
Block a user