Skip to content

Commit 5af6411

Browse files
committed
chore: Bump go to 1.24
1 parent 4871633 commit 5af6411

File tree

9 files changed

+33
-64
lines changed

9 files changed

+33
-64
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
3535
# Learn more about CodeQL language support at https://git.io/codeql-language-support
3636
language: [ 'go' ]
37-
os: [ 'ubuntu-22.04' ]
38-
go-version: [1.23]
37+
os: [ 'ubuntu-24.04' ]
38+
go-version: [1.24]
3939
steps:
4040
- name: Checkout
4141
uses: actions/checkout@v4

.github/workflows/dockerfiles.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
[
2525
"./build/docker/go-tools/Dockerfile",
2626
]
27-
runs-on: "ubuntu-22.04"
27+
runs-on: "ubuntu-24.04"
2828
name: Lint ${{ matrix.dockerfile }}
2929
steps:
3030
- name: Checkout

.github/workflows/go.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ jobs:
4040
fail-fast: false
4141
max-parallel: 3
4242
matrix:
43-
os: [ 'ubuntu-22.04' ]
44-
go-version: [1.23]
43+
os: [ 'ubuntu-24.04' ]
44+
go-version: [1.24]
4545
runs-on: ${{ matrix.os }}
4646
name: Build
4747
steps:
@@ -97,8 +97,8 @@ jobs:
9797
fail-fast: false
9898
max-parallel: 2
9999
matrix:
100-
os: [ 'ubuntu-22.04' ]
101-
go-version: [1.23]
100+
os: [ 'ubuntu-24.04' ]
101+
go-version: [1.24]
102102
runs-on: ${{ matrix.os }}
103103
name: Run Tests
104104
steps:
@@ -144,8 +144,8 @@ jobs:
144144
fail-fast: false
145145
max-parallel: 2
146146
matrix:
147-
os: [ 'ubuntu-22.04' ]
148-
go-version: [1.23]
147+
os: [ 'ubuntu-24.04' ]
148+
go-version: [1.24]
149149
runs-on: ${{ matrix.os }}
150150
name: Run linters
151151
steps:
@@ -201,8 +201,8 @@ jobs:
201201
fail-fast: true
202202
max-parallel: 1
203203
matrix:
204-
os: [ 'ubuntu-22.04' ]
205-
go-version: [1.23]
204+
os: [ 'ubuntu-24.04' ]
205+
go-version: [1.24]
206206
runs-on: ${{ matrix.os }}
207207
name: Quality reports
208208
steps:

.github/workflows/readme-stars.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
update-readme:
14-
runs-on: ubuntu-22.04
14+
runs-on: ubuntu-24.04
1515
env:
1616
USER_ID: ${{ secrets.AOC_USER_ID }}
1717
BOARD_ID: ${{ secrets.AOC_BOARD_ID}}

.github/workflows/release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
fail-fast: false
1414
max-parallel: 2
1515
matrix:
16-
os: [ 'ubuntu-22.04' ]
17-
go-version: [1.23]
16+
os: [ 'ubuntu-24.04' ]
17+
go-version: [1.24]
1818
runs-on: ${{ matrix.os }}
1919
name: Build
2020
steps:
@@ -59,8 +59,8 @@ jobs:
5959
fail-fast: false
6060
max-parallel: 2
6161
matrix:
62-
os: [ 'ubuntu-22.04' ]
63-
go-version: [1.23]
62+
os: [ 'ubuntu-24.04' ]
63+
go-version: [1.24]
6464
runs-on: ${{ matrix.os }}
6565
name: Regression tests
6666
steps:
@@ -108,8 +108,8 @@ jobs:
108108
fail-fast: false
109109
max-parallel: 1
110110
matrix:
111-
os: [ 'ubuntu-22.04' ]
112-
go-version: [1.23]
111+
os: [ 'ubuntu-24.04' ]
112+
go-version: [1.24]
113113
runs-on: ${{ matrix.os }}
114114
name: Lint
115115
steps:
@@ -161,8 +161,8 @@ jobs:
161161
fail-fast: false
162162
max-parallel: 1
163163
matrix:
164-
os: [ 'ubuntu-22.04' ]
165-
go-version: [1.23]
164+
os: [ 'ubuntu-24.04' ]
165+
go-version: [1.24]
166166
runs-on: ${{ matrix.os }}
167167
name: Release
168168
steps:

.goreleaser.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,15 @@ builds:
3030
- 'windows'
3131
goarch:
3232
- 'amd64'
33-
- 'arm'
3433
- 'arm64'
35-
ignore:
36-
- goos: darwin
37-
goarch: 'arm'
3834

3935
mod_timestamp: '{{ .CommitTimestamp }}'
4036
env:
4137
- CGO_ENABLED=0
4238
main: ./cmd/aoc-cli
4339
flags:
4440
- -trimpath
45-
ldflags:
46-
- "{{ .Env.GO_BUILD_LDFLAGS }}"
47-
-
41+
4842
universal_binaries:
4943
- # ID of the source build
5044
#
@@ -68,11 +62,13 @@ archives:
6862
- id: cli
6963
builds:
7064
- cli
71-
format: tar.gz
65+
formats:
66+
- tar.gz
7267
wrap_in_directory: true
7368
format_overrides:
7469
- goos: windows
75-
format: zip
70+
formats:
71+
- zip
7672
name_template: "{{ .Binary }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
7773
files:
7874
- LICENSE
@@ -111,4 +107,4 @@ changelog:
111107
order: 999
112108

113109
milestones:
114-
- close: true
110+
- close: true

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
SHELL := env VERSION=$(VERSION) $(SHELL)
22
VERSION ?= $(shell git describe --tags $(git rev-list --tags --max-count=1))
33

4-
GOVERSION:=1.23
4+
GOVERSION:=1.24
55

66
APP_NAME?=aoc-cli
77
SHELL := env APP_NAME=$(APP_NAME) $(SHELL)

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module github.com/obalunenko/advent-of-code
22

3-
go 1.23
3+
go 1.24
4+
45
toolchain go1.24.0
56

67
require (

scripts/build/app.sh

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,45 +13,17 @@ mkdir -p "${BIN_DIR}"
1313

1414
echo "${SCRIPT_NAME} is running... "
1515

16-
checkInstalled 'goreleaser'
17-
18-
goreleaser healthcheck
19-
2016
APP=${APP_NAME}
2117

2218
echo "Building ${APP}..."
2319

24-
COMMIT="$(git rev-parse HEAD)"
25-
SHORTCOMMIT="$(git rev-parse --short HEAD)"
26-
DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
27-
VERSION="$(git tag | sort -V | tail -1)"
28-
GOVERSION="$(go version | awk '{print $3;}')"
29-
30-
if [ -z "${VERSION}" ] || [ "${VERSION}" = "${SHORTCOMMIT}" ]; then
31-
VERSION="v0.0.0"
32-
fi
33-
34-
if [[ $(git diff --stat) != '' ]]; then
35-
echo 'dirty'
36-
37-
COMMIT="${COMMIT}-dirty"
38-
SHORTCOMMIT="${SHORTCOMMIT}-dirty"
39-
VERSION="${VERSION}-dirty"
40-
fi
41-
4220
BIN_OUT="${BIN_DIR}/${APP}"
4321

44-
BUILDINFO_VARS_PKG=github.com/obalunenko/version
45-
export GO_BUILD_LDFLAGS="-s -w \
46-
-X ${BUILDINFO_VARS_PKG}.version=${VERSION} \
47-
-X ${BUILDINFO_VARS_PKG}.commit=${COMMIT} \
48-
-X ${BUILDINFO_VARS_PKG}.shortcommit=${SHORTCOMMIT} \
49-
-X ${BUILDINFO_VARS_PKG}.builddate=${DATE} \
50-
-X ${BUILDINFO_VARS_PKG}.appname=${APP} \
51-
-X ${BUILDINFO_VARS_PKG}.goversion=${GOVERSION}"
22+
23+
GO_BUILD_PACKAGE="${REPO_ROOT}/cmd/${APP}"
5224

5325
rm -rf "${BIN_OUT}"
5426

55-
goreleaser build --skip=validate --clean --single-target --output "${BIN_OUT}"
27+
go build -trimpath -o "${BIN_OUT}" "${GO_BUILD_PACKAGE}"
5628

57-
echo "Binary compiled at ${BIN_OUT}"
29+
echo "Build ${BIN_OUT} success"

0 commit comments

Comments
 (0)