From 54b8481da0b28bb71831df1097f70fdbbf0801dd Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Tue, 16 Oct 2018 14:08:08 -0700 Subject: [PATCH] Add release script --- LICENSE | 7 +++++++ src/scripts/mkrelease.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 LICENSE create mode 100755 src/scripts/mkrelease.sh diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..def1a05 --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2018 adityapk + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/scripts/mkrelease.sh b/src/scripts/mkrelease.sh new file mode 100755 index 0000000..3da9fbb --- /dev/null +++ b/src/scripts/mkrelease.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +if [ -z $QT_STATIC ]; then echo "QT_STATIC is not set"; exit 1; fi +if [ -z $APP_VERSION ]; then echo "APP_VERSION is not set"; exit 1; fi +if [ -z $PREV_VERSION ]; then echo "PREV_VERSION is not set"; exit 1; fi + +echo "Updating version numbers" +# Replace the version number in the .pro file so it gets picked up everywhere +sed -i "s/${PREV_VERSION}/${APP_VERSION}/g" zcash-qt-wallet.pro > /dev/null + +# Also update it in the README.md +sed -i "s/${PREV_VERSION}/${APP_VERSION}/g" README.md > /dev/null + +echo "Configuring" +make distclean > /dev/null +$QT_STATIC/bin/qmake zcash-qt-wallet.pro -spec linux-clang CONFIG+=release > /dev/null + +echo "Building" +rm -rf bin/zcash-qt-wallet* > /dev/null +make -j$(nproc) > /dev/null + +echo "Packaging" +mkdir bin/zcash-qt-wallet-v$APP_VERSION > /dev/null +cp zcash-qt-wallet bin/zcash-qt-wallet-v$APP_VERSION > /dev/null +cp README.md bin/zcash-qt-wallet-v$APP_VERSION > /dev/null +cp LICENSE bin/zcash-qt-wallet-v$APP_VERSION > /dev/null +tar cvf bin/zcash-qt-wallet-v$APP_VERSION.tar.gz bin/zcash-qt-wallet-v$APP_VERSION/ > /dev/null + +echo "Done"