forked from greenaddress/WalletCrx
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakePackages.sh
executable file
·39 lines (34 loc) · 1.03 KB
/
makePackages.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
35
36
37
38
39
#!/bin/bash
set -e
function add_static {
LANGS="de en es fr it pl ru uk sv nl el th"
for LANG in $LANGS; do
zip -r $1 $LANG
done
zip -r $1 static/{css,fonts,img,js,sound}
}
epochTime=`date +%s`
./prepare.sh -s testnet
stashName=`git stash create`;
if [ -z "$stashName" ]
then
echo "Packaging HEAD"
git archive -o ../WalletCrxTestNet_$epochTime.zip HEAD
add_static ../WalletCrxTestNet_$epochTime.zip
else
echo "Packaging HEAD + localchanges"
git archive -o ../WalletCrxTestNet_$epochTime.zip $stashName
add_static ../WalletCrxTestNet_$epochTime.zip
fi
./prepare.sh -s mainnet
stashName=`git stash create`;
if [ -z "$stashName" ]
then
echo "Packaging HEAD"
git archive -o ../WalletCrxMainNet_$epochTime.zip HEAD
add_static ../WalletCrxMainNet_$epochTime.zip
else
echo "Packaging HEAD + localchanges"
git archive -o ../WalletCrxMainNet_$epochTime.zip $stashName
add_static ../WalletCrxMainNet_$epochTime.zip
fi