5 changed files with 135 additions and 37 deletions
@ -0,0 +1,57 @@ |
|||||||
|
#!/bin/bash |
||||||
|
# |
||||||
|
# env vars: |
||||||
|
# - WWW_DIR: path to "electrum-web" git clone |
||||||
|
# - for signing the version announcement file: |
||||||
|
# - ELECTRUM_SIGNING_ADDRESS (required) |
||||||
|
# - ELECTRUM_SIGNING_WALLET (required) |
||||||
|
# |
||||||
|
|
||||||
|
set -e |
||||||
|
|
||||||
|
PROJECT_ROOT="$(dirname "$(readlink -e "$0")")/.." |
||||||
|
CONTRIB="$PROJECT_ROOT/contrib" |
||||||
|
|
||||||
|
cd "$PROJECT_ROOT" |
||||||
|
|
||||||
|
. "$CONTRIB"/build_tools_util.sh |
||||||
|
|
||||||
|
|
||||||
|
echo -n "Remember to run add_cosigner to add any additional sigs. Continue (y/n)? " |
||||||
|
read answer |
||||||
|
if [ "$answer" != "y" ]; then |
||||||
|
echo "exit" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
|
||||||
|
if [ -z "$WWW_DIR" ] ; then |
||||||
|
WWW_DIR=/opt/electrum-web |
||||||
|
fi |
||||||
|
|
||||||
|
if [ -z "$ELECTRUM_SIGNING_WALLET" ] || [ -z "$ELECTRUM_SIGNING_ADDRESS" ]; then |
||||||
|
echo "You need to set env vars ELECTRUM_SIGNING_WALLET and ELECTRUM_SIGNING_ADDRESS!" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
VERSION=$(python3 -c "import electrum; print(electrum.version.ELECTRUM_VERSION)") |
||||||
|
info "VERSION: $VERSION" |
||||||
|
|
||||||
|
set -x |
||||||
|
|
||||||
|
info "updating www repo" |
||||||
|
./contrib/make_download "$WWW_DIR" |
||||||
|
info "signing the version announcement file" |
||||||
|
sig=$(./run_electrum -o signmessage $ELECTRUM_SIGNING_ADDRESS $VERSION -w $ELECTRUM_SIGNING_WALLET) |
||||||
|
echo "{ \"version\":\"$VERSION\", \"signatures\":{ \"$ELECTRUM_SIGNING_ADDRESS\":\"$sig\"}}" > "$WWW_DIR"/version |
||||||
|
|
||||||
|
# push changes to website repo |
||||||
|
pushd "$WWW_DIR" |
||||||
|
git diff |
||||||
|
git commit -a -m "version $VERSION" |
||||||
|
git push |
||||||
|
popd |
||||||
|
|
||||||
|
|
||||||
|
info "release_www.sh finished successfully." |
||||||
|
info "now you should run WWW_DIR/publish.sh to sign the website commit and upload signature" |
||||||
@ -0,0 +1,35 @@ |
|||||||
|
#!/bin/bash |
||||||
|
# Triggers deploy.sh to maybe update the website or move binaries. |
||||||
|
# uploadserver needs to be defined in /etc/hosts |
||||||
|
|
||||||
|
SSHUSER=$1 |
||||||
|
TRIGGERVERSION=$2 |
||||||
|
if [ -z $SSHUSER ] || [ -z TRIGGERVERSION ]; then |
||||||
|
echo "usage: $0 SSHUSER TRIGGERVERSION" |
||||||
|
echo "e.g. $0 thomasv 3.0.0" |
||||||
|
echo "e.g. $0 thomasv website" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
set -ex |
||||||
|
cd "$(dirname "$0")" |
||||||
|
|
||||||
|
if [ "$TRIGGERVERSION" == "website" ]; then |
||||||
|
rm -f trigger_website |
||||||
|
touch trigger_website |
||||||
|
echo "uploading file: trigger_website..." |
||||||
|
sftp -oBatchMode=no -b - "$SSHUSER@uploadserver" << ! |
||||||
|
cd electrum-downloads-airlock |
||||||
|
mput trigger_website |
||||||
|
bye |
||||||
|
! |
||||||
|
else |
||||||
|
rm -f trigger_binaries |
||||||
|
printf "$TRIGGERVERSION" > trigger_binaries |
||||||
|
echo "uploading file: trigger_binaries..." |
||||||
|
sftp -oBatchMode=no -b - "$SSHUSER@uploadserver" << ! |
||||||
|
cd electrum-downloads-airlock |
||||||
|
mput trigger_binaries |
||||||
|
bye |
||||||
|
! |
||||||
|
fi |
||||||
|
|
||||||
Loading…
Reference in new issue