Skip to content

Commit

Permalink
sdk-installer: ensure that Git for Windows' keyring is imported
Browse files Browse the repository at this point in the history
This is required so that the SDK can be installed fully, now that we
sign each and every package in Git for Windows' Pacman repository.

As the post-install script of msys2-keyring destroys every previous
attempt to initialize Pacman's keyring, we need to install
msys2-keyring (and gnupg) specifically before adding Git for Windows'
keys.

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Jul 12, 2017
1 parent 23b2f92 commit ce032c7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sdk-installer/setup-git-sdk.bat
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,25 @@

@IF ERRORLEVEL 1 GOTO INSTALL_INFO

@SET /A counter=0
:INSTALL_MSYS2_KEYRING
@SET /A counter+=1
@IF %counter% GEQ 5 @(
@ECHO Could not install msys2-keyring
@PAUSE
@EXIT 1
)

@REM next, force update msys2-keyring
@"%cwd%"\usr\bin\pacman -S --needed --force --noconfirm gnupg msys2-keyring

@IF ERRORLEVEL 1 GOTO INSTALL_MSYS2_KEYRING

@REM now, add Git for Windows' keyring
@"%cwd%"\usr\bin\bash.exe -l -c ^
'/usr/bin/bash /usr/bin/pacman-key --populate git-for-windows'
@IF ERRORLEVEL 1 PAUSE

@SET /A counter=0
:INSTALL_PACMAN
@SET /A counter+=1
Expand Down

0 comments on commit ce032c7

Please sign in to comment.