Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
a6bf2487
Unverified
Commit
a6bf2487
authored
3 years ago
by
ligi
Committed by
GitHub
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: fix linter install on windows (#24523)
parent
fb2ae8e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
ci.go
build/ci.go
+8
-3
download.go
internal/build/download.go
+1
-1
No files found.
build/ci.go
View file @
a6bf2487
...
...
@@ -336,12 +336,17 @@ func downloadLinter(cachedir string) string {
csdb
:=
build
.
MustLoadChecksums
(
"build/checksums.txt"
)
arch
:=
runtime
.
GOARCH
if
arch
==
"arm"
{
ext
:=
".tar.gz"
if
runtime
.
GOOS
==
"windows"
{
ext
=
".zip"
}
if
arch
==
"arm"
{
arch
+=
"v"
+
os
.
Getenv
(
"GOARM"
)
}
base
:=
fmt
.
Sprintf
(
"golangci-lint-%s-%s-%s"
,
version
,
runtime
.
GOOS
,
arch
)
url
:=
fmt
.
Sprintf
(
"https://github.com/golangci/golangci-lint/releases/download/v%s/%s
.tar.gz"
,
version
,
base
)
archivePath
:=
filepath
.
Join
(
cachedir
,
base
+
".tar.gz"
)
url
:=
fmt
.
Sprintf
(
"https://github.com/golangci/golangci-lint/releases/download/v%s/%s
%s"
,
version
,
base
,
ext
)
archivePath
:=
filepath
.
Join
(
cachedir
,
base
+
ext
)
if
err
:=
csdb
.
DownloadFile
(
url
,
archivePath
);
err
!=
nil
{
log
.
Fatal
(
err
)
}
...
...
This diff is collapsed.
Click to expand it.
internal/build/download.go
View file @
a6bf2487
...
...
@@ -58,7 +58,7 @@ func (db *ChecksumDB) Verify(path string) error {
}
fileHash
:=
hex
.
EncodeToString
(
h
.
Sum
(
nil
))
if
!
db
.
findHash
(
filepath
.
Base
(
path
),
fileHash
)
{
return
fmt
.
Errorf
(
"invalid file hash %s
"
,
fileHash
)
return
fmt
.
Errorf
(
"invalid file hash %s
for %s"
,
fileHash
,
filepath
.
Base
(
path
)
)
}
return
nil
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment