forked from heroku/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindows
More file actions
executable file
·48 lines (37 loc) · 1.15 KB
/
windows
File metadata and controls
executable file
·48 lines (37 loc) · 1.15 KB
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
#!/usr/bin/env bash
set +x
OS=windows
echo "$HEROKU_WINDOWS_KEY" | base64 --decode > /tmp/heroku-windows-key
source ./scripts/_init
function build () {
set -x
# setup workspace
INSTALLER_BASE=$TMP_DIR/windows-$ARCH-installer
rm -rf "$INSTALLER_BASE"
mkdir -p "$INSTALLER_BASE/bin"
cp "$ROOT_DIR/resources/exe/heroku.cmd" "$INSTALLER_BASE/bin/heroku.cmd"
tar xzf "$TGZ_PATH"
mv "$VERSIONED_BASE" "$INSTALLER_BASE/client"
if [ "$ARCH" == "x64" ]; then
PROGRAMSUFFIX="64"
else
PROGRAMSUFFIX=""
fi
sed -e "s/!define Version 'VERSION'/!define Version '${SHORT_VERSION}'/" resources/exe/heroku.nsi |\
sed -e "s/InstallDir .*/InstallDir \"\$PROGRAMFILES$PROGRAMSUFFIX\\\Heroku\"/" \
> "$INSTALLER_BASE/heroku.nsi"
makensis "$INSTALLER_BASE/heroku.nsi" \
| grep -v "\[compress\]" \
| grep -v "^File: Descending to"
set +x
osslsigncode -pkcs12 /tmp/heroku-windows-key \
-pass "$HEROKU_WINDOWS_SIGNING_PASS" \
-n 'Heroku CLI' \
-i https://toolbelt.heroku.com/ \
-in "$INSTALLER_BASE/installer.exe" -out "$DIST_DIR/heroku-cli-$ARCH.exe"
}
for ARCH in "${ARCHS[@]}"; do
setarch "$ARCH"
bg build
done
wait_all