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:
Luke Lau
2020-07-23 12:35:18 +01:00
parent 34d7e72d93
commit d8110230de
3 changed files with 12 additions and 5 deletions

View File

@@ -161,7 +161,10 @@ async function apt(tool: Tool, version: string): Promise<void> {
const toolName = tool === 'ghc' ? 'ghc' : 'cabal-install';
const v = tool === 'cabal' ? version.slice(0, 3) : version;
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> {
@@ -180,7 +183,7 @@ async function choco(tool: Tool, version: string): Promise<void> {
}
async function ghcupBin(os: OS): Promise<string> {
const v = '0.1.5';
const v = '0.1.8';
const cachedBin = tc.find('ghcup', v);
if (cachedBin) return join(cachedBin, 'ghcup');

View File

@@ -1,6 +1,7 @@
{
"ghc": [
"8.10.1",
"8.8.4",
"8.8.3",
"8.8.2",
"8.8.1",