Update ghcup to 0.1.8 and add ghc-8.8.4 support
Need to make the apt install function not error whenever it returns a non-zero exit code, because ghc-8.8.4 isn't available via apt just yet
This commit is contained in:
9
dist/index.js
vendored
9
dist/index.js
vendored
@@ -4334,7 +4334,7 @@ function escapeProperty(s) {
|
|||||||
/***/ 447:
|
/***/ 447:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
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"]};
|
module.exports = {"ghc":["8.10.1","8.8.4","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"]};
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
@@ -11095,7 +11095,10 @@ async function apt(tool, version) {
|
|||||||
const toolName = tool === 'ghc' ? 'ghc' : 'cabal-install';
|
const toolName = tool === 'ghc' ? 'ghc' : 'cabal-install';
|
||||||
const v = tool === 'cabal' ? version.slice(0, 3) : version;
|
const v = tool === 'cabal' ? version.slice(0, 3) : version;
|
||||||
core.info(`Attempting to install ${toolName} ${v} using apt-get`);
|
core.info(`Attempting to install ${toolName} ${v} using apt-get`);
|
||||||
await exec_1.exec(`sudo -- sh -c "apt-get -y install ${toolName}-${v}"`);
|
// Ignore the return code so we can fall back to ghcup
|
||||||
|
await exec_1.exec(`sudo -- sh -c "apt-get -y install ${toolName}-${v}"`, undefined, {
|
||||||
|
ignoreReturnCode: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
async function choco(tool, version) {
|
async function choco(tool, version) {
|
||||||
core.info(`Attempting to install ${tool} ${version} using chocolatey`);
|
core.info(`Attempting to install ${tool} ${version} using chocolatey`);
|
||||||
@@ -11111,7 +11114,7 @@ async function choco(tool, version) {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
async function ghcupBin(os) {
|
async function ghcupBin(os) {
|
||||||
const v = '0.1.5';
|
const v = '0.1.8';
|
||||||
const cachedBin = tc.find('ghcup', v);
|
const cachedBin = tc.find('ghcup', v);
|
||||||
if (cachedBin)
|
if (cachedBin)
|
||||||
return path_1.join(cachedBin, 'ghcup');
|
return path_1.join(cachedBin, 'ghcup');
|
||||||
|
|||||||
@@ -161,7 +161,10 @@ async function apt(tool: Tool, version: string): Promise<void> {
|
|||||||
const toolName = tool === 'ghc' ? 'ghc' : 'cabal-install';
|
const toolName = tool === 'ghc' ? 'ghc' : 'cabal-install';
|
||||||
const v = tool === 'cabal' ? version.slice(0, 3) : version;
|
const v = tool === 'cabal' ? version.slice(0, 3) : version;
|
||||||
core.info(`Attempting to install ${toolName} ${v} using apt-get`);
|
core.info(`Attempting to install ${toolName} ${v} using apt-get`);
|
||||||
await exec(`sudo -- sh -c "apt-get -y install ${toolName}-${v}"`);
|
// Ignore the return code so we can fall back to ghcup
|
||||||
|
await exec(`sudo -- sh -c "apt-get -y install ${toolName}-${v}"`, undefined, {
|
||||||
|
ignoreReturnCode: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function choco(tool: Tool, version: string): Promise<void> {
|
async function choco(tool: Tool, version: string): Promise<void> {
|
||||||
@@ -180,7 +183,7 @@ async function choco(tool: Tool, version: string): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function ghcupBin(os: OS): Promise<string> {
|
async function ghcupBin(os: OS): Promise<string> {
|
||||||
const v = '0.1.5';
|
const v = '0.1.8';
|
||||||
const cachedBin = tc.find('ghcup', v);
|
const cachedBin = tc.find('ghcup', v);
|
||||||
if (cachedBin) return join(cachedBin, 'ghcup');
|
if (cachedBin) return join(cachedBin, 'ghcup');
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"ghc": [
|
"ghc": [
|
||||||
"8.10.1",
|
"8.10.1",
|
||||||
|
"8.8.4",
|
||||||
"8.8.3",
|
"8.8.3",
|
||||||
"8.8.2",
|
"8.8.2",
|
||||||
"8.8.1",
|
"8.8.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user