mirror of
https://github.com/DeLaGuardo/setup-clojure.git
synced 2025-01-13 17:57:55 +08:00
fix: add cpu architecture suffix to artifact name
This commit is contained in:
parent
44fb9b5654
commit
b30ef4f1ad
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "setup-clojure",
|
||||
"version": "12.1",
|
||||
"version": "12.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "setup-clojure",
|
||||
"version": "12.1",
|
||||
"version": "12.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^3.2.2",
|
||||
|
@ -25,12 +25,14 @@ export async function getLatestCljstyle(githubAuth?: string): Promise<string> {
|
||||
}
|
||||
|
||||
export function getArtifactName(version: string): string {
|
||||
const [major, minor] = version.split('.').map(n => parseInt(n))
|
||||
const archiSuffix = major > 0 || minor > 15 ? '_amd64' : ''
|
||||
const platform = os.platform()
|
||||
switch (platform) {
|
||||
case 'darwin':
|
||||
return `cljstyle_${version}_macos.zip`
|
||||
return `cljstyle_${version}_macos${archiSuffix}.zip`
|
||||
default:
|
||||
return `cljstyle_${version}_linux.zip`
|
||||
return `cljstyle_${version}_linux${archiSuffix}.zip`
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user