-
Notifications
You must be signed in to change notification settings - Fork 10
/
setupVersion
executable file
·84 lines (67 loc) · 2.47 KB
/
setupVersion
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
if [[ $# > 0 ]]
then
VER=$1
cd docs
./make
cd ..
jq '.version = "'$VER'"' package.json > tmp.json
cat tmp.json > package.json
rm tmp.json
if [ -d dist ]
then
rm -rf dist
fi
mkdir dist
npm run dist
cd dist
rm -rf upload
mkdir upload
cp Block\ Keeper-$VER-mac.zip upload/Block-Keeper-mac.zip
cp Block\ Keeper-$VER.dmg upload/Block-Keeper.dmg
RELEASEDATE=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z")
echo '{
"version": "'$VER'",
"releaseDate": "'$RELEASEDATE'",
"url": "https://github.com/DallasMcNeil/Block-Keeper/releases/download/v'$VER'/Block-Keeper-mac.zip"
}' > upload/release.json
cp Block\ Keeper\ $VER\ armv7l.AppImage upload/blockkeeper-armv7l.AppImage
cp Block\ Keeper\ $VER\ i386.AppImage upload/blockkeeper-i386.AppImage
cp Block\ Keeper\ $VER.AppImage upload/blockkeeper-x86_64.AppImage
cp squirrel-windows-ia32/Block\ Keeper\ Setup\ $VER.exe upload/Block-Keeper-Setup.exe
cp squirrel-windows-ia32/blockkeeper-$VER-full.nupkg upload/blockkeeper-$VER-full.nupkg
cp squirrel-windows-ia32/RELEASES upload/RELEASES
cd ..
echo '{
"win32-ia32-prod": {
"readme": "",
"update": "https://github.com/DallasMcNeil/Block-Keeper/releases/download/v'$VER'",
"install": "https://github.com/DallasMcNeil/Block-Keeper/releases/download/v'$VER'/Block-Keeper-Setup.exe",
"version": "'$VER'"
},
"darwin-x64-prod": {
"readme": "",
"update": "https://github.com/DallasMcNeil/Block-Keeper/releases/download/v'$VER'/release.json",
"install": "https://github.com/DallasMcNeil/Block-Keeper/releases/download/v'$VER'/Block-Keeper.dmg",
"version": "'$VER'"
},
"linux-ia32-prod": {
"update": "https://github.com/DallasMcNeil/Block-Keeper/releases/download/v'$VER'/blockkeeper-i386.AppImage",
"install": "https://github.com/DallasMcNeil/Block-Keeper/releases/download/v'$VER'/blockkeeper-i386.AppImage",
"version": "'$VER'"
},
"linux-x64-prod": {
"update": "https://github.com/DallasMcNeil/Block-Keeper/releases/download/v'$VER'/blockkeeper-x86_64.AppImage",
"install": "https://github.com/DallasMcNeil/Block-Keeper/releases/download/v'$VER'/blockkeeper-x86_64.AppImage",
"version": "'$VER'"
},
"linux-arm-prod": {
"update": "https://github.com/DallasMcNeil/Block-Keeper/releases/download/v'$VER'/blockkeeper-armv7l.AppImage",
"install": "https://github.com/DallasMcNeil/Block-Keeper/releases/download/v'$VER'/blockkeeper-armv7l.AppImage",
"version": "'$VER'"
}
}' > updates.json
cd ..
else
echo "ERROR: Missing version number"
fi