Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit bc8c103

Browse files
author
Jared Weakly
committed
Update latest stack to v2.3.1
1 parent dfe236d commit bc8c103

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ Recommendation: Use the latest available version if possible.
156156
**Stack:**
157157

158158
- `latest` (recommended) -- follows the latest release automatically.
159+
- `2.3.1` `2.3`
159160
- `2.1.3` `2.1`
160161
- `2.1.1`
161162
- `1.9.3.1` `1.9`

dist/index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2584,7 +2584,7 @@ function escapeProperty(s) {
25842584
/***/ 447:
25852585
/***/ (function(module) {
25862586

2587-
module.exports = {"ghc":["8.10.1","8.8.3","8.8.2","8.8.1","8.6.5","8.6.4","8.6.3","8.6.2","8.6.1","8.4.4","8.4.3","8.4.2","8.4.1","8.2.2","8.0.2","7.10.3"],"cabal":["3.2.0.0","3.0.0.0","2.4.1.0","2.4.0.0","2.2.0.0"],"stack":["2.1.3","2.1.1","1.9.3","1.9.1","1.7.1","1.6.5","1.6.3","1.6.1","1.5.1","1.5.0","1.4.0","1.3.2","1.3.0","1.2.0"]};
2587+
module.exports = {"ghc":["8.10.1","8.8.3","8.8.2","8.8.1","8.6.5","8.6.4","8.6.3","8.6.2","8.6.1","8.4.4","8.4.3","8.4.2","8.4.1","8.2.2","8.0.2","7.10.3"],"cabal":["3.2.0.0","3.0.0.0","2.4.1.0","2.4.0.0","2.2.0.0"],"stack":["2.3.1","2.1.3","2.1.1","1.9.3","1.9.1","1.7.1","1.6.5","1.6.3","1.6.1","1.5.1","1.5.0","1.4.0","1.3.2","1.3.0","1.2.0"]};
25882588

25892589
/***/ }),
25902590

@@ -10721,13 +10721,11 @@ exports.installTool = installTool;
1072110721
async function stack(version, os) {
1072210722
core.info(`Attempting to install stack ${version}`);
1072310723
const build = {
10724-
linux: 'linux-x86_64-static',
10724+
linux: `linux-x86_64${version >= '2.3.1' ? '' : '-static'}`,
1072510725
darwin: 'osx-x86_64',
1072610726
win32: 'windows-x86_64'
1072710727
}[os];
10728-
const url = version === 'latest'
10729-
? `https://get.haskellstack.org/stable/${build}.tar.gz`
10730-
: `https://github.com/commercialhaskell/stack/releases/download/v${version}/stack-${version}-${build}.tar.gz`;
10728+
const url = `https://github.com/commercialhaskell/stack/releases/download/v${version}/stack-${version}-${build}.tar.gz`;
1073110729
const p = await tc.downloadTool(`${url}`).then(tc.extractTar);
1073210730
const [stackPath] = await glob_1.create(`${p}/stack*`, {
1073310731
implicitDescendants: false

src/installer.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,12 @@ export async function installTool(
135135
async function stack(version: string, os: OS): Promise<void> {
136136
core.info(`Attempting to install stack ${version}`);
137137
const build = {
138-
linux: 'linux-x86_64-static',
138+
linux: `linux-x86_64${version >= '2.3.1' ? '' : '-static'}`,
139139
darwin: 'osx-x86_64',
140140
win32: 'windows-x86_64'
141141
}[os];
142142

143-
const url =
144-
version === 'latest'
145-
? `https://get.haskellstack.org/stable/${build}.tar.gz`
146-
: `https://github.com/commercialhaskell/stack/releases/download/v${version}/stack-${version}-${build}.tar.gz`;
143+
const url = `https://github.com/commercialhaskell/stack/releases/download/v${version}/stack-${version}-${build}.tar.gz`;
147144
const p = await tc.downloadTool(`${url}`).then(tc.extractTar);
148145
const [stackPath] = await glob(`${p}/stack*`, {
149146
implicitDescendants: false

src/versions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
],
2020
"cabal": ["3.2.0.0", "3.0.0.0", "2.4.1.0", "2.4.0.0", "2.2.0.0"],
2121
"stack": [
22+
"2.3.1",
2223
"2.1.3",
2324
"2.1.1",
2425
"1.9.3",

0 commit comments

Comments
 (0)