Last active
March 1, 2017 21:58
-
-
Save rugk/6839ee2ece57b8d8272befdebd432836 to your computer and use it in GitHub Desktop.
Threema Web Build Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This is a wrapper for more convenient built of Threema Web. | |
# constants | |
CURR_DIR="$( pwd )" | |
SERVE_DIR="$CURR_DIR/serve" | |
SOURCE="threema-web" | |
SOURCE_DIR="$CURR_DIR/$SOURCE" | |
# get user input | |
read -p "Please enter the version number to upgrade to: " | |
if [ "${version}" = "" ]; then | |
exit 1 | |
fi | |
cd "$SOURCE_DIR" | |
# update source | |
git stash | |
git pull | |
# verify | |
git verify-tag v${version} || exit | |
# apply update | |
git checkout v${version} | |
git stash apply | |
# build | |
npm install --production | |
npm run dist | |
# copy/link | |
cd "$SERVE_DIR" | |
sudo ln -s "../$SOURCE/release/threema-web-${version}" "release" | |
sudo ln -s "../$SOURCE/dist/threema-web-${version}.tar.gz" "release.tar.gz" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
updated version available, contact me if you want it (CC0-licensed)