Skip to content

Commit 6ee82bb

Browse files
authored
chore: rename tools.go to 0-tools.go (#322)
1 parent 0733890 commit 6ee82bb

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

.github/workflows/CI&CD.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131
~/.cache/go-build
3232
~/.cache/golangci-lint
3333
.buildcache
34-
key: v1-go-with-tools-${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('tools.go') }}-${{ hashFiles('go.sum') }}
34+
key: v1-go-with-tools-${{ runner.os }}-${{ env.GO_VERSION }}-${{ hashFiles('0-tools.go') }}-${{ hashFiles('go.sum') }}
3535
restore-keys: |
36-
v1-go-with-tools-${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('tools.go') }}-
37-
v1-go-with-tools-${{ runner.os }}-${{ matrix.go }}-
36+
v1-go-with-tools-${{ runner.os }}-${{ env.GO_VERSION }}-${{ hashFiles('0-tools.go') }}-
37+
v1-go-with-tools-${{ runner.os }}-${{ env.GO_VERSION }}-
3838
3939
- run: scripts/test
4040

@@ -74,10 +74,10 @@ jobs:
7474
~/.cache/go-build
7575
~/.cache/golangci-lint
7676
.buildcache
77-
key: v1-go-with-tools-${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('tools.go') }}-${{ hashFiles('go.sum') }}
77+
key: v1-go-with-tools-${{ runner.os }}-${{ env.GO_VERSION }}-${{ hashFiles('0-tools.go') }}-${{ hashFiles('go.sum') }}
7878
restore-keys: |
79-
v1-go-with-tools-${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('tools.go') }}-
80-
v1-go-with-tools-${{ runner.os }}-${{ matrix.go }}-
79+
v1-go-with-tools-${{ runner.os }}-${{ env.GO_VERSION }}-${{ hashFiles('0-tools.go') }}-
80+
v1-go-with-tools-${{ runner.os }}-${{ env.GO_VERSION }}-
8181
8282
# Add support for more platforms with QEMU (optional)
8383
# https://github.com/docker/setup-qemu-action

tools.go 0-tools.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//go:build generate
22

3+
// NOTE: Prefix 0- in this file's name ensures that `go generate ./...` processes it first.
4+
35
//go:generate mkdir -p .buildcache/bin
46
//go:generate -command GOINSTALL env "GOBIN=$PWD/.buildcache/bin" go install
57
//go:generate -command INSTALL-HADOLINT sh -c ".buildcache/bin/hadolint --version 2>/dev/null | grep -wq \"$DOLLAR{DOLLAR}{1}\" || curl -sSfL https://github.com/hadolint/hadolint/releases/download/v\"$DOLLAR{DOLLAR}{1}\"/hadolint-\"$(uname)\"-x86_64 --output ./.buildcache/bin/hadolint && chmod +x .buildcache/bin/hadolint" -sh

scripts/cover

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
export PATH="$PWD/.buildcache/bin:$PATH"
33
set -e -o pipefail
4-
go generate tools.go
4+
go generate 0-tools.go
55

66
gotestsum -- \
77
-coverpkg="$(go list ./... | paste -s -d,)" \

scripts/release

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
export PATH="$PWD/.buildcache/bin:$PATH"
33
set -x -e -o pipefail
4-
go generate tools.go
4+
go generate 0-tools.go
55

66
DIST_DIR=bin
77
TAG=$(git describe --match='v*' --exact-match --tags)

scripts/test

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
export PATH="$PWD/.buildcache/bin:$PATH"
33
set -x -e -o pipefail
4-
go generate tools.go
4+
go generate 0-tools.go
55

66
hadolint Dockerfile
77

0 commit comments

Comments
 (0)