Update readme and correctly add path
This commit is contained in:
11
README.md
11
README.md
@@ -121,7 +121,7 @@ jobs:
|
|||||||
|
|
||||||
## Version Support
|
## Version Support
|
||||||
|
|
||||||
**GHC:**
|
**GHC on Mac/Ubuntu:**
|
||||||
|
|
||||||
- `latest` (default, recommended)
|
- `latest` (default, recommended)
|
||||||
- `8.10.1` `8.10`
|
- `8.10.1` `8.10`
|
||||||
@@ -141,6 +141,15 @@ jobs:
|
|||||||
- `8.0.2` `8.0`
|
- `8.0.2` `8.0`
|
||||||
- `7.10.3` `7.10`
|
- `7.10.3` `7.10`
|
||||||
|
|
||||||
|
**GHC on Windows:**
|
||||||
|
|
||||||
|
- `latest` (default, recommended)
|
||||||
|
- `8.10.2.2`
|
||||||
|
- `8.10.1.1`
|
||||||
|
- `8.8.4.1`
|
||||||
|
- `8.8.3.2`
|
||||||
|
- `8.8.2.1`
|
||||||
|
|
||||||
Suggestion: Try to support the three latest major versions of GHC.
|
Suggestion: Try to support the three latest major versions of GHC.
|
||||||
|
|
||||||
**Cabal:**
|
**Cabal:**
|
||||||
|
|||||||
9
dist/index.js
vendored
9
dist/index.js
vendored
@@ -4291,7 +4291,7 @@ function escapeProperty(s) {
|
|||||||
/***/ 447:
|
/***/ 447:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
module.exports = {"ghc":["8.10.2","8.10.2.2","8.10.1.1","8.10.1","8.8.4.1","8.8.4","8.8.3.2","8.8.3","8.8.2.1","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.2","8.10.2.2","8.10.1","8.10.1.1","8.8.4","8.8.4.1","8.8.3","8.8.3.2","8.8.2","8.8.2.1","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"]};
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
@@ -11184,7 +11184,12 @@ async function choco(tool, version) {
|
|||||||
ignoreReturnCode: true
|
ignoreReturnCode: true
|
||||||
});
|
});
|
||||||
// Manually add the path because it won't happen until the end of the step normally
|
// Manually add the path because it won't happen until the end of the step normally
|
||||||
const chocoPath = path_1.join(`${process.env.ChocolateyInstall}`, 'lib', `${tool}.${version}`, 'tools', `${tool}-${version}`, tool === 'ghc' ? 'bin' : '');
|
let pathArray = version.split('.');
|
||||||
|
let pathVersion = pathArray.length > 3
|
||||||
|
? pathArray.slice(0, pathArray.length - 1).join('.')
|
||||||
|
: pathArray.join('.');
|
||||||
|
const chocoPath = path_1.join(`${process.env.ChocolateyInstall}`, 'lib', `${tool}.${version}`, 'tools', tool === 'ghc' ? `${tool}-${pathVersion}` : `${tool}-${version}`, // choco trims the ghc version here
|
||||||
|
tool === 'ghc' ? 'bin' : '');
|
||||||
core.addPath(chocoPath);
|
core.addPath(chocoPath);
|
||||||
}
|
}
|
||||||
async function ghcupBin(os) {
|
async function ghcupBin(os) {
|
||||||
|
|||||||
@@ -187,12 +187,17 @@ async function choco(tool: Tool, version: string): Promise<void> {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
// Manually add the path because it won't happen until the end of the step normally
|
// Manually add the path because it won't happen until the end of the step normally
|
||||||
|
const pathArray = version.split('.');
|
||||||
|
const pathVersion =
|
||||||
|
pathArray.length > 3
|
||||||
|
? pathArray.slice(0, pathArray.length - 1).join('.')
|
||||||
|
: pathArray.join('.');
|
||||||
const chocoPath = join(
|
const chocoPath = join(
|
||||||
`${process.env.ChocolateyInstall}`,
|
`${process.env.ChocolateyInstall}`,
|
||||||
'lib',
|
'lib',
|
||||||
`${tool}.${version}`,
|
`${tool}.${version}`,
|
||||||
'tools',
|
'tools',
|
||||||
`${tool}-${version}`,
|
tool === 'ghc' ? `${tool}-${pathVersion}` : `${tool}-${version}`, // choco trims the ghc version here
|
||||||
tool === 'ghc' ? 'bin' : ''
|
tool === 'ghc' ? 'bin' : ''
|
||||||
);
|
);
|
||||||
core.addPath(chocoPath);
|
core.addPath(chocoPath);
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
"ghc": [
|
"ghc": [
|
||||||
"8.10.2",
|
"8.10.2",
|
||||||
"8.10.2.2",
|
"8.10.2.2",
|
||||||
"8.10.1.1",
|
|
||||||
"8.10.1",
|
"8.10.1",
|
||||||
"8.8.4.1",
|
"8.10.1.1",
|
||||||
"8.8.4",
|
"8.8.4",
|
||||||
"8.8.3.2",
|
"8.8.4.1",
|
||||||
"8.8.3",
|
"8.8.3",
|
||||||
"8.8.2.1",
|
"8.8.3.2",
|
||||||
"8.8.2",
|
"8.8.2",
|
||||||
|
"8.8.2.1",
|
||||||
"8.8.1",
|
"8.8.1",
|
||||||
"8.6.5",
|
"8.6.5",
|
||||||
"8.6.4",
|
"8.6.4",
|
||||||
|
|||||||
Reference in New Issue
Block a user