diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1b775fc5..5a08c04d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -254,7 +254,7 @@ jobs: shell: bash - name: SonarCloud report upload - uses: sonarsource/sonarcloud-github-action@v1.9 + uses: sonarsource/sonarcloud-github-action@v2.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/build/docker/go-tools/Dockerfile b/build/docker/go-tools/Dockerfile index 732a892a..ba31959f 100644 --- a/build/docker/go-tools/Dockerfile +++ b/build/docker/go-tools/Dockerfile @@ -1,3 +1,3 @@ -FROM ghcr.io/obalunenko/go-tools:v1.3.4 AS builder +FROM ghcr.io/obalunenko/go-tools:v1.4.0 AS builder CMD ["/bin/sh", "-c", ""] diff --git a/go.mod b/go.mod index 6f6c504d..7295d944 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,14 @@ module github.com/obalunenko/advent-of-code go 1.21 +toolchain go1.22.0 require ( github.com/briandowns/spinner v1.23.0 github.com/manifoldco/promptui v0.9.0 - github.com/obalunenko/getenv v1.12.1 - github.com/obalunenko/logger v1.0.1 - github.com/obalunenko/version v1.1.0 + github.com/obalunenko/getenv v1.13.0 + github.com/obalunenko/logger v1.1.0 + github.com/obalunenko/version v1.2.0 github.com/savioxavier/termlink v1.3.0 github.com/stretchr/testify v1.8.4 github.com/urfave/cli/v2 v2.27.1 @@ -23,7 +24,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect - golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect + golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect golang.org/x/sys v0.6.0 // indirect golang.org/x/term v0.6.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 50b225af..7000ae5a 100644 --- a/go.sum +++ b/go.sum @@ -19,12 +19,12 @@ github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/obalunenko/getenv v1.12.1 h1:16dfwnXa5AhZuScaT4qAxUapwpRBxTAdKmsHwc/aDvQ= -github.com/obalunenko/getenv v1.12.1/go.mod h1:GtEy59H7644JXfVjxDFo1jEUe1yJ4asSyPwN8D19Pvs= -github.com/obalunenko/logger v1.0.1 h1:XERBQry7q7Kxr6lDeh9RLsUr7oZj+T5J845B4RPxORE= -github.com/obalunenko/logger v1.0.1/go.mod h1:BLGJLvxm4ImsjuGVOjrx59VUsbsLR2f7IkVPFjLyBvg= -github.com/obalunenko/version v1.1.0 h1:yVua7OHnK3+MJpendeMmAlfzVmq7R1h8MO3Ufz7HEec= -github.com/obalunenko/version v1.1.0/go.mod h1:Or267aCQxNcAtgOeWA7yOe/RqJS4XDaMfcFwk3ohbOg= +github.com/obalunenko/getenv v1.13.0 h1:KE6Kky3OMLkvOgzfZkaOjodnnMawhEEuju4Hbs7DCt0= +github.com/obalunenko/getenv v1.13.0/go.mod h1:z/14VQJlEBeaa/JI/RNufa/EQOSDVA2RRUz56ukYOM0= +github.com/obalunenko/logger v1.1.0 h1:Q5drJuCuwz16mm96tcrl5e20uoGSOI4O+VWSauR/mQg= +github.com/obalunenko/logger v1.1.0/go.mod h1:rS66dO9P2j/lybFrDB0Sce1DEVaOi6ag6WDIzljTg8c= +github.com/obalunenko/version v1.2.0 h1:eUYme2w38fjzcvToInTGM85xAJycZHo65GvynbH8jCo= +github.com/obalunenko/version v1.2.0/go.mod h1:kXnCfV2LUe+UHRrzjwPC/5lpnPbypwmLZh7BJx7wG1A= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -37,8 +37,8 @@ github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 h1:EDuYyU/MkFXllv9QF9819VlI9a4tzGuCbhG0ExK9o1U= -golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= +golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/github.com/obalunenko/getenv/Makefile b/vendor/github.com/obalunenko/getenv/Makefile index fd22f8b9..df5c7784 100644 --- a/vendor/github.com/obalunenko/getenv/Makefile +++ b/vendor/github.com/obalunenko/getenv/Makefile @@ -15,6 +15,8 @@ COMPOSE_TOOLS_CMD_BASE=docker compose -f $(COMPOSE_TOOLS_FILE) COMPOSE_TOOLS_CMD_UP=$(COMPOSE_TOOLS_CMD_BASE) up --exit-code-from COMPOSE_TOOLS_CMD_PULL=$(COMPOSE_TOOLS_CMD_BASE) pull +GOVERSION:=1.22 + TARGET_MAX_CHAR_NUM=20 ## Show help @@ -117,6 +119,10 @@ check-releaser: new-version: vet test-regression ./scripts/release/new-version.sh +bump-go-version: + ./scripts/bump-go.sh $(GOVERSION) +.PHONY: bump-go-version + .DEFAULT_GOAL := help diff --git a/vendor/github.com/obalunenko/logger/Makefile b/vendor/github.com/obalunenko/logger/Makefile index 48569eb4..b7dc8d04 100644 --- a/vendor/github.com/obalunenko/logger/Makefile +++ b/vendor/github.com/obalunenko/logger/Makefile @@ -3,6 +3,8 @@ BIN_DIR=./bin SHELL := env VERSION=$(VERSION) $(SHELL) VERSION ?= $(shell git describe --tags $(git rev-list --tags --max-count=1)) +GOVERSION:=1.22 + APP_NAME?=logger SHELL := env APP_NAME=$(APP_NAME) $(SHELL) @@ -135,4 +137,9 @@ new-version: vet test-regression build ./scripts/release/new-version.sh .PHONY: new-release +bump-go-version: + ./scripts/bump-go.sh $(GOVERSION) +.PHONY: bump-go-version + + .DEFAULT_GOAL := help diff --git a/vendor/github.com/obalunenko/version/version.go b/vendor/github.com/obalunenko/version/version.go index ee2beff2..936ce913 100644 --- a/vendor/github.com/obalunenko/version/version.go +++ b/vendor/github.com/obalunenko/version/version.go @@ -40,26 +40,32 @@ var ( // build info goversion = unset ) +// GetGoVersion returns the go version func GetGoVersion() string { return goversion } +// GetVersion returns the app version func GetVersion() string { return version } +// GetBuildDate returns the build date func GetBuildDate() string { return builddate } +// GetCommit returns the git commit func GetCommit() string { return commit } +// GetAppName returns the app name func GetAppName() string { return appname } +// GetShortCommit returns the short git commit func GetShortCommit() string { return shortcommit } diff --git a/vendor/modules.txt b/vendor/modules.txt index 126c6544..e6e465d1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -24,16 +24,16 @@ github.com/mattn/go-colorable # github.com/mattn/go-isatty v0.0.14 ## explicit; go 1.12 github.com/mattn/go-isatty -# github.com/obalunenko/getenv v1.12.1 -## explicit; go 1.21 +# github.com/obalunenko/getenv v1.13.0 +## explicit; go 1.22 github.com/obalunenko/getenv github.com/obalunenko/getenv/internal github.com/obalunenko/getenv/option -# github.com/obalunenko/logger v1.0.1 -## explicit; go 1.21 +# github.com/obalunenko/logger v1.1.0 +## explicit; go 1.22 github.com/obalunenko/logger -# github.com/obalunenko/version v1.1.0 -## explicit; go 1.17 +# github.com/obalunenko/version v1.2.0 +## explicit; go 1.22 github.com/obalunenko/version # github.com/pmezard/go-difflib v1.0.0 ## explicit @@ -54,7 +54,7 @@ github.com/urfave/cli/v2 # github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 ## explicit github.com/xrash/smetrics -# golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 +# golang.org/x/exp v0.0.0-20240213143201-ec583247a57a ## explicit; go 1.20 golang.org/x/exp/constraints # golang.org/x/sys v0.6.0