add script to automate incrementing updater version number

This commit is contained in:
overdodactyl 2018-09-25 13:33:52 -06:00
parent 83991f0bc5
commit 8dbbac472f
1 changed files with 14 additions and 0 deletions

14
scripts/updater_version.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
new_version=$1
# Substitute version number
current_ver="$(sed 's/[-<!CURR_VER:> ]//g' <<< $(sed -n '/CURR_VER/p' website/index.html))"
sed -i -e "s/$current_ver/$new_version/g" website/index.html
# Build website and push to GitHub
parcel build website/index.html -d website/dist --public-url ./
git add website/*
git commit -m "website: change updater version number"
git push
git subtree push --prefix website/dist origin gh-pages