git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix windows CI

The stack windows binary archive at the previous URL seems to have changed from a .zip to a .tar.gz, which was confusing 7zip - it seems 7zip uses the file name to guess what kind of archive it is. Separately, it appears that stack has started providing downloads via github releases in addition to stackage.org, and the github download includes a zip archive. Since extracting zip archives is easier with 7zip, we now use this download location instead. The Stack executable itself uses this URL for self-updates, so I think it ought to be safe to use this URL: https://github.com/commercialhaskell/stack/commit/aa94dcd65c22a4fcbd4dacd5aa7064daf8e49a6b#diff-fc80843636d5c5474f236e348f03a9e8R139

commit25f58b72f8c6e9a4d5bad6d2476fc2fa1e37dd69 authorHarry Garrood <harry@garrood.me> dateTue 6 Dec 2016, 11:27 (10 years ago) parent6954b06
1 file changed+4−1
appveyor.yml+4−1
appveyor.yml+4−1
@@ -3,6 +3,7 @@ version: '{build}'
33environment:
44 # Keep the path as short as possible, just in case.
55 STACK_ROOT: c:\s
6+ STACK_VER: 1.2.0
67 RELEASE_USER: purescript
78 RELEASE_REPO: purescript
89cache:
@@ -15,7 +16,9 @@ install:
1516- ps: |
1617 New-Item -ItemType Directory -Force -Path C:\tools
1718 $env:Path += ";C:\tools"
18− (New-Object Net.WebClient).DownloadFile('https://www.stackage.org/stack/windows-x86_64', 'c:\tools\stack.zip')
19+ $stackRelease = "stack-$env:STACK_VER-windows-x86_64"
20+ $downloadUrl = "https://github.com/commercialhaskell/stack/releases/download/v$env:STACK_VER/$stackRelease.zip"
21+ (New-Object Net.WebClient).DownloadFile($downloadUrl, 'c:\tools\stack.zip')
1922 pushd c:\tools
2023 7z x c:\tools\stack.zip stack.exe
2124 popd