forked from spesmilo/electrum-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.sh
executable file
·34 lines (31 loc) · 881 Bytes
/
publish.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# sign website commit and publish it
# uploadserver needs to be defined in /etc/hosts
GPGUSER=$1
if [ -z $GPGUSER ]; then
echo "usage: $0 gpg_username"
exit 1
fi
set -ex
cd "$(dirname "$0")"
echo $(git rev-parse master)
export SSHUSER="$GPGUSER"
PUBKEY=""
if [ $GPGUSER == "ThomasV" ]; then
PUBKEY="--local-user 6694D8DE7BE8EE5631BED9502BD5824B7F9470E6"
export SSHUSER=thomasv
elif [ $GPGUSER == "sombernight_releasekey" ]; then
PUBKEY="--local-user 0EEDCFD5CAFB459067349B23CA9EEEC43DF911DC"
export SSHUSER=sombernight
else
echo "ERROR! unexpected GPGUSER=$GPGUSER"
exit 1
fi
git rev-parse master | gpg --sign --armor --detach $PUBKEY > website.$GPGUSER.asc
touch trigger_website
sftp -oBatchMode=no -b - ${SSHUSER}@uploadserver << !
cd electrum-downloads-airlock
mput website.$GPGUSER.asc
-mput trigger_website
bye
!