Skip to content

Commit

Permalink
chore: bump go version to 1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
janosmiko committed Sep 26, 2024
1 parent 7ba9e17 commit bddeaba
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 87 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main-golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: 1.23
- name: Download deps
run: go mod download -x
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.59.1
version: v1.60.0
2 changes: 1 addition & 1 deletion .github/workflows/main-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.22
go-version: 1.23
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22
go-version: 1.23
- name: Download deps
run: go mod download -x
- name: Test
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.6.10] - 2024-09-26

### Changed

- Update to go version 1.23

## [0.6.9] - 2024-07-26

### Changed
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Dependencies:

- golang 1.22
- golang 1.23
- goreleaser

```
Expand Down
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
SHELL = bash
project = reward
GIT_AUTHOR = janosmiko
GO_DOCKER = docker run --rm -v $(PWD):/app -w /app golang:1.23
GO = $(GO_DOCKER) go
GOLANGCI_LINT = docker run --rm -v $(PWD):/app -v $(HOME)/Library/Caches/golangci-lint:/tmp/golangci-lint -e GOLANGCI_LINT_CACHE=/tmp/golangci-lint -w /app golangci/golangci-lint:v1.60.1 golangci-lint
GORELEASER = docker run --rm -v $(PWD):/app -w /app goreleaser/goreleaser:v2.1.0

help: ## Outputs this help screen
@grep -E '(^[\/a-zA-Z0-9_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
Expand All @@ -17,26 +21,26 @@ endif

## —— Commands —————————————————————————————————————————————————————————
build: ## Build the command to ./dist
docker run --rm -v $(PWD):/app -w /app golang:1.22 /bin/bash -c '\
$(GO_DOCKER) /bin/bash -c '\
go mod download && \
go generate ./... && \
CGO_ENABLED=0 go build -ldflags="-s -w" -o dist/reward ./cmd/reward/main.go'

package: ## Build the binaries and packages using goreleaser (without releasing it)
docker run --rm -v $(PWD):/app -w /app goreleaser/goreleaser:v2.1.0 --clean --snapshot
$(GORELEASER) --clean --snapshot

build-local: ## Build the binaries only using goreleaser (without releasing it)
docker run --rm -v $(PWD):/app -w /app goreleaser/goreleaser:v2.1.0 --clean --snapshot --config .local.goreleaser.yml
$(GORELEASER) --clean --snapshot --config .local.goreleaser.yml

## —— Go Commands —————————————————————————————————————————————————————————
gomod: ## Update Go Dependencies
docker run --rm -v $(PWD):/app -w /app golang:1.22 go mod tidy
$(GO) mod tidy

lint: ## Lint Go Code
docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v1.59.1 golangci-lint run ./...
$(GOLANGCI_LINT) run ./...

lint-fix: ## Lint Go Code
docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v1.59.1 golangci-lint run --fix ./...
$(GOLANGCI_LINT) run --fix ./...

test: ## Run Go tests
docker run --rm -v $(PWD):/app -w /app golang:1.22 go test -v -race ./...
$(GO) test -v -race ./...
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.6.9
v0.6.10
2 changes: 1 addition & 1 deletion cmd/reward/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build go1.22
//go:build go1.23

package main

Expand Down
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/rewardenv/reward

go 1.22
go 1.23

require (
github.com/Masterminds/semver v1.5.0
Expand Down Expand Up @@ -78,8 +78,7 @@ require (
go.opentelemetry.io/otel/trace v1.27.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
golang.org/x/mod v0.18.0 // indirect
golang.org/x/tools v0.22.0 // indirect
golang.org/x/net v0.26.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gotest.tools/v3 v3.4.0 // indirect
)
78 changes: 8 additions & 70 deletions go.sum

Large diffs are not rendered by default.

0 comments on commit bddeaba

Please sign in to comment.