Skip to content

Commit 4c62ceb

Browse files
committed
mingw: add check for artifact on github releases
1 parent 9acb083 commit 4c62ceb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

windows/build_mingw.bat

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
set ROOT=%CD%
44
mkdir "%ROOT%\artifacts"
55

6-
set ARTIFACT=mingw-libs-%MINGW_VER%-2.zip
6+
set TAG=mingw-libs-%MINGW_VER%-2
7+
set ARTIFACT=%TAG%.zip
78
set ARTIFACTPATH=%ROOT%\artifacts\%ARTIFACT%
9+
set GITHUB_RELEASE=https://github.com/dlang/installer/releases/download/%TAG%/%ARTIFACT%
810

911
REM Stop early if the artifact already exists
10-
powershell -Command "Invoke-WebRequest downloads.dlang.org/other/%ARTIFACT% -OutFile %ARTIFACTPATH%" && exit /B 0
12+
powershell -Command "Invoke-WebRequest %GITHUB_RELEASE% -OutFile %ARTIFACTPATH%" && exit /B 0
1113

1214
set DMD_URL=http://downloads.dlang.org/releases/2.x/%D_VERSION%/dmd.%D_VERSION%.windows.7z
1315
echo DMD_URL=%DMD_URL%

0 commit comments

Comments
 (0)