Skip to content

Commit 48a4fd2

Browse files
authored
Revert "chore: use new assets file (golangci#1154)"
This reverts commit 362889a.
1 parent 6d5a938 commit 48a4fd2

File tree

6 files changed

+9
-38
lines changed

6 files changed

+9
-38
lines changed

.github/workflows/codeql.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@ name: "Code Scanning - Action"
22

33
on:
44
push:
5-
branches:
6-
- master
7-
- main
5+
branches: [ master ]
86
pull_request:
97
# The branches below must be a subset of the branches above
10-
branches:
11-
- master
12-
- main
8+
branches: [ master ]
139
schedule:
1410
- cron: '0 17 * * 5'
1511

.github/workflows/test.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
name: "build-and-test"
22
on: # rebuild any PRs and main branch changes
33
pull_request:
4-
branches:
5-
- master
6-
- main
74
push:
85
branches:
96
- master
10-
- main
117
- "releases/*"
128

139
jobs:
@@ -57,8 +53,8 @@ jobs:
5753
version:
5854
- ""
5955
- "latest"
60-
- "v1.60" # TODO(ldez): it should be updated for v2.
61-
- "v1.60.1" # TODO(ldez): it should be updated for v2.
56+
- "v1.60"
57+
- "v1.60.1"
6258
runs-on: ${{ matrix.os }}
6359
permissions:
6460
contents: read
@@ -86,8 +82,8 @@ jobs:
8682
version:
8783
- ""
8884
- "latest"
89-
- "v1.60.1" # TODO(ldez): it should be updated for v2.
90-
- "adbdfdb288e939a175182b7a12b7555215ce98b2" # TODO(ldez): it should be updated for v2.
85+
- "v1.60.1"
86+
- "adbdfdb288e939a175182b7a12b7555215ce98b2"
9187
runs-on: ${{ matrix.os }}
9288
permissions:
9389
contents: read

dist/post_run/index.js

Lines changed: 1 addition & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/run/index.js

Lines changed: 1 addition & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/install.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,12 @@ export async function goInstall(versionConfig: VersionConfig): Promise<string> {
9191

9292
const options: ExecOptions = { env: { ...process.env, CGO_ENABLED: "1" } }
9393

94-
// TODO(ldez): it should be updated for v2.
9594
const exres = await execShellCommand(
9695
`go install github.com/golangci/golangci-lint/cmd/golangci-lint@${versionConfig.TargetVersion}`,
9796
options
9897
)
9998
printOutput(exres)
10099

101-
// TODO(ldez): it should be updated for v2.
102100
const res = await execShellCommand(
103101
`go install -n github.com/golangci/golangci-lint/cmd/golangci-lint@${versionConfig.TargetVersion}`,
104102
options

src/version.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const modVersionRe = /github.com\/golangci\/golangci-lint\s(v.+)/
1818

1919
const parseVersion = (s: string): Version => {
2020
if (s == "latest" || s == "") {
21-
// TODO(ldez): it should be replaced with an explicit version (ex: v1.64.0)
2221
return null
2322
}
2423

@@ -41,7 +40,6 @@ export const stringifyVersion = (v: Version): string => {
4140
return `v${v.major}.${v.minor}${v.patch !== null ? `.${v.patch}` : ``}`
4241
}
4342

44-
// TODO(ldez): it should be updated to v2.0.0.
4543
const minVersion = {
4644
major: 1,
4745
minor: 28,
@@ -116,8 +114,7 @@ const getConfig = async (): Promise<Config> => {
116114
maxRetries: 5,
117115
})
118116
try {
119-
// TODO(ldez): HEAD should be replaced with an explicit version (ex: v1.64.0).
120-
const url = `https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/assets/github-action-config-v1.json`
117+
const url = `https://raw.githubusercontent.com/golangci/golangci-lint/master/assets/github-action-config.json`
121118
const response: httpm.HttpClientResponse = await http.get(url)
122119
if (response.message.statusCode !== 200) {
123120
throw new Error(`failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`)
@@ -135,8 +132,6 @@ export async function findLintVersion(mode: InstallMode): Promise<VersionConfig>
135132

136133
if (mode == InstallMode.GoInstall) {
137134
const v: string = core.getInput(`version`)
138-
// TODO(ldez): latest should be replaced with an explicit version (ex: v1.64.0).
139-
// TODO(ldez): AssetURL should be updated for v2.
140135
return { TargetVersion: v ? v : "latest", AssetURL: "github.com/golangci/golangci-lint" }
141136
}
142137

0 commit comments

Comments
 (0)