Skip to content

Commit

Permalink
chore(go): v1.21 (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zenithar committed Aug 11, 2023
1 parent efb20ee commit 87fca03
Show file tree
Hide file tree
Showing 21 changed files with 47 additions and 64 deletions.
11 changes: 0 additions & 11 deletions .github/dependabot.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: "1.20"
go-version: "1.21"
-
name: Build Harp
run: |
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ jobs:
fail-fast: true
matrix:
go-version:
- "1.19"
- "1.20"
- "1.21"
permissions:
actions: write
runs-on: ubuntu-latest
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: '1.20'
go-version: '1.21'
-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
-
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:
name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: '1.20' # test only the latest go version to speed up CI
go-version: '1.21' # test only the latest go version to speed up CI
-
name: Cache Go modules
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
Expand All @@ -208,7 +208,7 @@ jobs:
name: Setup gotestsum
uses: autero1/action-gotestsum@7263b9d73912eec65f46337689e59fac865c425f # v2.0.0
with:
gotestsum_version: '1.9.0'
gotestsum_version: '1.10.1'
-
name: Run tests
run: gotestsum --format short-verbose ./pkg/...
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: '1.20' # test only the latest go version to speed up CI
go-version: '1.21' # test only the latest go version to speed up CI
-
name: Cache Go modules
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
Expand All @@ -253,7 +253,7 @@ jobs:
name: Setup gotestsum
uses: autero1/action-gotestsum@7263b9d73912eec65f46337689e59fac865c425f # v2.0.0
with:
gotestsum_version: '1.9.0'
gotestsum_version: '1.10.1'
-
name: Run tests
run: gotestsum --format short-verbose ./pkg/...
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: '1.20' # test only the latest go version to speed up CI
go-version: '1.21' # test only the latest go version to speed up CI
-
name: Cache Go modules
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
Expand All @@ -298,7 +298,7 @@ jobs:
name: Setup gotestsum
uses: autero1/action-gotestsum@7263b9d73912eec65f46337689e59fac865c425f # v2.0.0
with:
gotestsum_version: '1.9.0'
gotestsum_version: '1.10.1'
-
name: Run tests
run: gotestsum --format short-verbose ./pkg/...
2 changes: 1 addition & 1 deletion .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
-
name: Cache Go modules
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 2.1.4

### 2022-08-11

DIST:

* CI
* Build with Golang 1.21
* Dependency updates

## 2.1.3

### 2022-07-26
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ $ nix develop

```sh
$ go version
go version go1.19.4 linux/amd64
go version go1.21 linux/amd64
```

> Simple go version manager - <https://github.com/stefanmaric/g>
Expand Down
2 changes: 1 addition & 1 deletion api/gen/go/cso/v1/secret.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/gen/go/cso/v1/validator_api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/gen/go/harp/bundle/v1/bundle.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/gen/go/harp/bundle/v1/bundle_api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/gen/go/harp/bundle/v1/patch.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/gen/go/harp/bundle/v1/ruleset.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/gen/go/harp/bundle/v1/template.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/gen/go/harp/container/v1/container.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions build/mage/docker/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ package docker

const (
// Standard build mode.
golangImage = "golang:1.18"
golangVersion = "1.18.4"
goBoringVersion = "1.18.4b7"
toolImage = "elastic/harp-tools:latest"
golangImage = "golang:1.21"
golangVersion = "1.21"
toolImage = "elastic/harp-tools:latest"
)
27 changes: 6 additions & 21 deletions build/mage/docker/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ LABEL \
org.opencontainers.image.version=$VERSION \
org.opencontainers.image.licences="ASL2"
{{ if .OverrideGoBoringVersion }}
# Override goboring version
RUN wget https://storage.googleapis.com/go-boringcrypto/go{{ .GoBoringVersion }}.linux-amd64.tar.gz \
&& rm -rf /usr/local/go && tar -C /usr/local -xzf go{{ .GoBoringVersion }}.linux-amd64.tar.gz \
&& rm go{{ .GoBoringVersion }}.linux-amd64.tar.gz
{{ end }}
# hadolint ignore=DL3008
RUN set -eux; \
apt-get update -y && \
Expand Down Expand Up @@ -144,26 +137,18 @@ func Tools() error {
if os.Getenv("GOLANG_VERSION") != "" {
golangVersion = os.Getenv("GOLANG_VERSION")
}
goBoringVersion := goBoringVersion
overrideGoBoringVersion := false
if os.Getenv("GOBORING_VERSION") != "" {
goBoringVersion = os.Getenv("GOBORING_VERSION")
overrideGoBoringVersion = true
}
fipsMode := "0"
if os.Getenv("FIPS_MODE") == "1" {
fipsMode = os.Getenv("FIPS_MODE")
}

buf, err := merge(dockerToolTemplate, map[string]interface{}{
"BuildDate": time.Now().Format(time.RFC3339),
"Version": git.Tag,
"VcsRef": git.Revision,
"GolangImage": golangBaseImage,
"GolangVersion": golangVersion,
"OverrideGoBoringVersion": overrideGoBoringVersion,
"GoBoringVersion": goBoringVersion,
"FIPSMode": fipsMode,
"BuildDate": time.Now().Format(time.RFC3339),
"Version": git.Tag,
"VcsRef": git.Revision,
"GolangImage": golangBaseImage,
"GolangVersion": golangVersion,
"FIPSMode": fipsMode,
})
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion build/mage/golang/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func Build(name, packageName, version string, opts ...BuildOption) func() error
if os.Getenv("HARP_BUILD_FIPS_MODE") == "1" {
artifactName = fmt.Sprintf("%s-fips", artifactName)
compilationFlags = append(compilationFlags, "fips")
buildTags = "-tags=fips"
buildTags = "-tags=fips,goexperiment.boringcrypto"
}

// Check if CGO is enabled
Expand Down
2 changes: 1 addition & 1 deletion build/mage/golang/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (

// Keep only last 2 versions.
var goVersions = []string{
"~1.21",
"~1.20",
"~1.19",
}

func init() {
Expand Down
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildGoModule rec {
src = lib.cleanSource ./.;

subPackages = [ "cmd/harp" ];
vendorSha256 = "sha256-9D3JLNkXoQL+oa+P+i3uCI+wmpStLX5uWtHnZZrpRAc=";
vendorSha256 = "sha256-nCLwRCpdbcam1OA82fEyfGPTc7yShJC2ug8NPV0vUBQ=";
ldflags = [
"-s" "-w" "-buildid="
"-X zntr.io/harp/v2/build/version.Name=harp"
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@
devtools = {
gci = pkgs.buildGoModule rec {
pname = "gci";
version = "b9a2597d93b0cfa2267fb682665be8ef86863dee";
version = "52e43a48497695a73d350b04a7e03423e3dd4909";

src = pkgs.fetchFromGitHub {
owner = "daixiang0";
repo = "gci";
rev = "${version}";
sha256 = "sha256-qWEEcIbTgYmGVnnTW+hM8e8nw5VLWN1TwzdUIZrxF3s=";
sha256 = "sha256-EBklnsZR8VwM89BztligZBDapmgyKuI9Ns8EFFo3ai8=";
};

vendorSha256 = "sha256-dlt+i/pEP3RzW4JwndKTU7my2Nn7/2rLFlk8n1sFR60=";
vendorSha256 = "sha256-g7htGfU6C2rzfu8hAn6SGr0ZRwB8ZzSf9CgHYmdupE8=";

nativeBuildInputs = [ pkgs.installShellFiles ];
};
Expand Down

0 comments on commit 87fca03

Please sign in to comment.