Skip to content

Commit 3e9b835

Browse files
committed
please.sh build git: use the signtool alias when available
In git-for-windows/MINGW-packages@4ddc5d6 we changed the process to build the mingw-w64-git packages to allow for code-signing by setting the SIGNTOOL environment variable to an appropriate command-line that just needs the file names as additional arguments. Since we already have code in please.sh that expects an optional signtool configuration as alias, let's just reuse that, if available. This helps in environments where Windows File Protection is enabled, which suffers greatly when being used with unsigned .exe files (everything gets super slow). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 676bef4 commit 3e9b835

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

please.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,18 @@ pkg_build () {
289289
die "Could not edit tag\n"
290290
fi
291291

292+
293+
if test -z "$(git --git-dir="$sdk64/usr/src/build-extra/.git" \
294+
config alias.signtool)"
295+
then
296+
extra=
297+
else
298+
extra="SIGNTOOL=\"git --git-dir=\\\"$sdk64/usr/src"
299+
extra="$extra/build-extra/.git\\\" signtool\" "
300+
fi
292301
"$sdk/git-cmd.exe" --command=usr\\bin\\sh.exe -l -c \
293302
'MAKEFLAGS=-j5 MINGW_INSTALLS=mingw32\ mingw64 \
294-
makepkg-mingw -s --noconfirm &&
303+
'"$extra"'makepkg-mingw -s --noconfirm &&
295304
MINGW_INSTALLS=mingw64 makepkg-mingw --allsource' ||
296305
die "%s: could not build\n" "$sdk/$pkgpath"
297306

0 commit comments

Comments
 (0)