File tree Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,10 @@ dist: compile-all
18
18
pack : dist
19
19
@bin/pack.sh
20
20
21
- app : pack
21
+ sign : dist
22
+ @bin/sign.sh
23
+
24
+ app : dist
22
25
@bin/app.sh
23
26
24
27
test : app
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -e
3
+ cd " $( dirname " $0 " ) /.."
4
+ echo
5
+ echo -e " \033[1;33m[sign]\033[0m"
6
+
7
+ appDir=app
8
+
9
+ if [ ! " $THUMBPRINT " ]; then
10
+ echo " [ERROR] THUMBPRINT environment variable unset; cannot sign EXEs."
11
+ exit 1
12
+ fi
13
+
14
+ # Find the correct signtool.exe.
15
+ arch=$( uname -m)
16
+ case " $arch " in
17
+ x86_64) arch=x64 ;;
18
+ esac
19
+ signtool=$(
20
+ find ' /c/Program Files' * ' /Windows Kits' -name signtool.exe |
21
+ grep " /$arch /" | head -n1
22
+ )
23
+
24
+ if [ -f " $signtool " ]
25
+ then
26
+ echo " Found signtool.exe at: $signtool "
27
+ else
28
+ echo " [ERROR] signtool.exe not found at: $signtool "
29
+ exit 1
30
+ fi
31
+
32
+ if [ ! " $TIMESTAMP_SERVER " ]; then
33
+ TIMESTAMP_SERVER=" http://time.certum.pl/"
34
+ fi
35
+
36
+ " $signtool " sign /sha1 " $THUMBPRINT " \
37
+ /tr " $TIMESTAMP_SERVER " \
38
+ /td SHA256 /fd SHA256 /v \
39
+ " $appDir \\ " * .exe \
40
+ " $appDir \\ jaunch\\ jaunch-windows-" * .exe &&
41
+
42
+ " $signtool " verify /pa /all \
43
+ " $appDir \\ " * .exe \
44
+ " $appDir \\ jaunch\\ jaunch-windows-" * .exe
45
+
46
+ echo " Signing complete!"
You can’t perform that action at this time.
0 commit comments