feat: support linux arm64 public preview (#1144)
This commit is contained in:
parent
a0297a1378
commit
ec5d18412c
3
.github/workflows/test.yml
vendored
3
.github/workflows/test.yml
vendored
@ -47,6 +47,7 @@ jobs:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- ubuntu-24.04-arm
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
version:
|
||||
@ -75,6 +76,7 @@ jobs:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- ubuntu-24.04-arm
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
version:
|
||||
@ -104,6 +106,7 @@ jobs:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- ubuntu-24.04-arm
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
10
dist/post_run/index.js
generated
vendored
10
dist/post_run/index.js
generated
vendored
@ -93771,6 +93771,9 @@ const getAssetURL = (versionConfig) => {
|
||||
}
|
||||
let arch = os_1.default.arch();
|
||||
switch (arch) {
|
||||
case "arm64":
|
||||
arch = "arm64";
|
||||
break;
|
||||
case "x64":
|
||||
arch = "amd64";
|
||||
break;
|
||||
@ -94389,6 +94392,7 @@ exports.findLintVersion = findLintVersion;
|
||||
const core = __importStar(__nccwpck_require__(7484));
|
||||
const httpm = __importStar(__nccwpck_require__(4844));
|
||||
const fs = __importStar(__nccwpck_require__(9896));
|
||||
const os_1 = __importDefault(__nccwpck_require__(857));
|
||||
const path_1 = __importDefault(__nccwpck_require__(6928));
|
||||
const install_1 = __nccwpck_require__(232);
|
||||
const versionRe = /^v(\d+)\.(\d+)(?:\.(\d+))?$/;
|
||||
@ -94485,10 +94489,14 @@ async function findLintVersion(mode) {
|
||||
// if the patched version is passed, just use it
|
||||
if (reqLintVersion?.major !== null && reqLintVersion?.minor != null && reqLintVersion?.patch !== null) {
|
||||
return new Promise((resolve) => {
|
||||
let arch = "amd64";
|
||||
if (os_1.default.arch() === "arm64") {
|
||||
arch = "arm64";
|
||||
}
|
||||
const versionWithoutV = `${reqLintVersion.major}.${reqLintVersion.minor}.${reqLintVersion.patch}`;
|
||||
resolve({
|
||||
TargetVersion: `v${versionWithoutV}`,
|
||||
AssetURL: `https://github.com/golangci/golangci-lint/releases/download/v${versionWithoutV}/golangci-lint-${versionWithoutV}-linux-amd64.tar.gz`,
|
||||
AssetURL: `https://github.com/golangci/golangci-lint/releases/download/v${versionWithoutV}/golangci-lint-${versionWithoutV}-linux-${arch}.tar.gz`,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
10
dist/run/index.js
generated
vendored
10
dist/run/index.js
generated
vendored
@ -93771,6 +93771,9 @@ const getAssetURL = (versionConfig) => {
|
||||
}
|
||||
let arch = os_1.default.arch();
|
||||
switch (arch) {
|
||||
case "arm64":
|
||||
arch = "arm64";
|
||||
break;
|
||||
case "x64":
|
||||
arch = "amd64";
|
||||
break;
|
||||
@ -94389,6 +94392,7 @@ exports.findLintVersion = findLintVersion;
|
||||
const core = __importStar(__nccwpck_require__(7484));
|
||||
const httpm = __importStar(__nccwpck_require__(4844));
|
||||
const fs = __importStar(__nccwpck_require__(9896));
|
||||
const os_1 = __importDefault(__nccwpck_require__(857));
|
||||
const path_1 = __importDefault(__nccwpck_require__(6928));
|
||||
const install_1 = __nccwpck_require__(232);
|
||||
const versionRe = /^v(\d+)\.(\d+)(?:\.(\d+))?$/;
|
||||
@ -94485,10 +94489,14 @@ async function findLintVersion(mode) {
|
||||
// if the patched version is passed, just use it
|
||||
if (reqLintVersion?.major !== null && reqLintVersion?.minor != null && reqLintVersion?.patch !== null) {
|
||||
return new Promise((resolve) => {
|
||||
let arch = "amd64";
|
||||
if (os_1.default.arch() === "arm64") {
|
||||
arch = "arm64";
|
||||
}
|
||||
const versionWithoutV = `${reqLintVersion.major}.${reqLintVersion.minor}.${reqLintVersion.patch}`;
|
||||
resolve({
|
||||
TargetVersion: `v${versionWithoutV}`,
|
||||
AssetURL: `https://github.com/golangci/golangci-lint/releases/download/v${versionWithoutV}/golangci-lint-${versionWithoutV}-linux-amd64.tar.gz`,
|
||||
AssetURL: `https://github.com/golangci/golangci-lint/releases/download/v${versionWithoutV}/golangci-lint-${versionWithoutV}-linux-${arch}.tar.gz`,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -22,6 +22,9 @@ const getAssetURL = (versionConfig: VersionConfig): string => {
|
||||
}
|
||||
let arch = os.arch()
|
||||
switch (arch) {
|
||||
case "arm64":
|
||||
arch = "arm64"
|
||||
break
|
||||
case "x64":
|
||||
arch = "amd64"
|
||||
break
|
||||
|
@ -1,6 +1,7 @@
|
||||
import * as core from "@actions/core"
|
||||
import * as httpm from "@actions/http-client"
|
||||
import * as fs from "fs"
|
||||
import os from "os"
|
||||
import path from "path"
|
||||
|
||||
import { InstallMode } from "./install"
|
||||
@ -139,10 +140,14 @@ export async function findLintVersion(mode: InstallMode): Promise<VersionConfig>
|
||||
// if the patched version is passed, just use it
|
||||
if (reqLintVersion?.major !== null && reqLintVersion?.minor != null && reqLintVersion?.patch !== null) {
|
||||
return new Promise((resolve) => {
|
||||
let arch: string = "amd64"
|
||||
if (os.arch() === "arm64") {
|
||||
arch = "arm64"
|
||||
}
|
||||
const versionWithoutV = `${reqLintVersion.major}.${reqLintVersion.minor}.${reqLintVersion.patch}`
|
||||
resolve({
|
||||
TargetVersion: `v${versionWithoutV}`,
|
||||
AssetURL: `https://github.com/golangci/golangci-lint/releases/download/v${versionWithoutV}/golangci-lint-${versionWithoutV}-linux-amd64.tar.gz`,
|
||||
AssetURL: `https://github.com/golangci/golangci-lint/releases/download/v${versionWithoutV}/golangci-lint-${versionWithoutV}-linux-${arch}.tar.gz`,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user