Skip to content

Commit a8c41f0

Browse files
committed
upgrade, using go tool for templ
1 parent 8eee90d commit a8c41f0

File tree

4 files changed

+85
-57
lines changed

4 files changed

+85
-57
lines changed

Dockerfile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ COPY ./.tolgeerc ./
1313
RUN npx tolgee pull --api-key "${LOCALIZE_API_KEY}" --states REVIEWED
1414

1515
# Build app
16-
FROM golang:1.23-bookworm AS builder-go
16+
FROM golang:1.24-bookworm AS builder-go
1717

1818
ARG BRAND_FLAVOR=red
1919
ENV BRAND_FLAVOR $BRAND_FLAVOR
@@ -23,25 +23,23 @@ WORKDIR /workspace
2323
COPY go.mod go.sum ./
2424
RUN --mount=type=cache,target=$GOPATH/pkg/mod go mod download
2525

26-
# Install templ
27-
RUN go install github.com/a-h/templ/cmd/templ@latest
28-
2926
COPY ./ ./
3027

3128
# load localizations
32-
COPY --from=builder-node /workspace/static/localization/ ./static/localization//
29+
COPY --from=builder-node /workspace/static/localization/ ./static/localization/
3330

34-
# build a fully standalone binary with zero dependencies
31+
# generate static assets
3532
RUN --mount=type=cache,target=$GOPATH/pkg/mod go generate ./internal/assets
3633
RUN --mount=type=cache,target=$GOPATH/pkg/mod go generate ./cmd/frontend/assets/generate
3734

3835
# generate frontend
39-
RUN templ generate
36+
RUN go tool templ generate
4037

38+
# build a fully standalone binary with zero dependencies
4139
RUN --mount=type=cache,target=$GOPATH/pkg/mod CGO_ENABLED=1 GOOS=linux go build -ldflags='-s -w' -trimpath -o /bin/aftermath .
4240

4341
# Make a scratch container with required files and binary
44-
FROM debian:stable-slim
42+
FROM scratch
4543

4644
ENV TZ=Etc/UTC
4745
ENV ZONEINFO=/zoneinfo.zip

go.mod

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
module github.com/cufee/aftermath
22

3-
go 1.23.5
3+
go 1.24.3
44

55
require github.com/go-jet/jet/v2 v2.13.0
66

77
// replace github.com/cufee/facepaint => ../facepaint
88

99
require (
1010
github.com/Kodeworks/golang-image-ico v0.0.0-20141118225523-73f0f4cfade9
11-
github.com/PuerkitoBio/goquery v1.10.2
12-
github.com/a-h/templ v0.3.857
13-
github.com/bwmarrin/discordgo v0.28.1
11+
github.com/PuerkitoBio/goquery v1.10.3
12+
github.com/a-h/templ v0.3.865
13+
github.com/bwmarrin/discordgo v0.29.0
1414
github.com/cufee/aftermath-assets v0.1.0
1515
github.com/cufee/am-wg-proxy-next/v2 v2.2.6
1616
github.com/cufee/facepaint v0.0.9
@@ -31,49 +31,59 @@ require (
3131
github.com/nao1215/imaging v1.0.9
3232
github.com/nlpodyssey/gopickle v0.3.0
3333
github.com/pkg/errors v0.9.1
34-
github.com/prometheus/client_golang v1.21.1
34+
github.com/prometheus/client_golang v1.22.0
3535
github.com/rs/zerolog v1.34.0
3636
github.com/servusdei2018/shards/v2 v2.5.0
3737
github.com/stretchr/testify v1.10.0
38-
github.com/tdewolff/minify/v2 v2.23.0
38+
github.com/tdewolff/minify/v2 v2.23.8
3939
go.dedis.ch/protobuf v1.0.11
40-
golang.org/x/image v0.26.0
41-
golang.org/x/sync v0.13.0
42-
golang.org/x/text v0.24.0
40+
golang.org/x/image v0.27.0
41+
golang.org/x/sync v0.14.0
42+
golang.org/x/text v0.25.0
4343
gopkg.in/yaml.v3 v3.0.1
4444
)
4545

4646
require (
47+
github.com/a-h/parse v0.0.0-20250122154542-74294addb73e // indirect
48+
github.com/andybalholm/brotli v1.1.0 // indirect
4749
github.com/andybalholm/cascadia v1.3.3 // indirect
4850
github.com/beorn7/perks v1.0.1 // indirect
51+
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
4952
github.com/cespare/xxhash/v2 v2.3.0 // indirect
53+
github.com/cli/browser v1.3.0 // indirect
5054
github.com/davecgh/go-spew v1.1.1 // indirect
55+
github.com/fatih/color v1.16.0 // indirect
56+
github.com/fsnotify/fsnotify v1.8.0 // indirect
5157
github.com/google/go-querystring v1.1.0 // indirect
5258
github.com/google/uuid v1.6.0 // indirect
5359
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
5460
github.com/jackc/pgconn v1.14.3 // indirect
5561
github.com/jackc/pgio v1.0.0 // indirect
5662
github.com/jackc/pgpassfile v1.0.0 // indirect
5763
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
58-
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
64+
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
5965
github.com/jackc/pgtype v1.14.4 // indirect
6066
github.com/json-iterator/go v1.1.12 // indirect
61-
github.com/klauspost/compress v1.18.0 // indirect
6267
github.com/mattn/go-colorable v0.1.14 // indirect
6368
github.com/mattn/go-isatty v0.0.20 // indirect
6469
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
6570
github.com/modern-go/reflect2 v1.0.2 // indirect
6671
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
72+
github.com/natefinch/atomic v1.0.1 // indirect
6773
github.com/pmezard/go-difflib v1.0.0 // indirect
68-
github.com/prometheus/client_model v0.6.1 // indirect
69-
github.com/prometheus/common v0.63.0 // indirect
70-
github.com/prometheus/procfs v0.16.0 // indirect
74+
github.com/prometheus/client_model v0.6.2 // indirect
75+
github.com/prometheus/common v0.64.0 // indirect
76+
github.com/prometheus/procfs v0.16.1 // indirect
7177
github.com/robfig/cron/v3 v3.0.1 // indirect
7278
github.com/rs/xid v1.6.0 // indirect
73-
github.com/tdewolff/parse/v2 v2.7.22 // indirect
79+
github.com/tdewolff/parse/v2 v2.8.1 // indirect
7480
go.uber.org/atomic v1.11.0 // indirect
75-
golang.org/x/crypto v0.37.0 // indirect
76-
golang.org/x/net v0.38.0 // indirect
77-
golang.org/x/sys v0.32.0 // indirect
81+
golang.org/x/crypto v0.38.0 // indirect
82+
golang.org/x/mod v0.24.0 // indirect
83+
golang.org/x/net v0.40.0 // indirect
84+
golang.org/x/sys v0.33.0 // indirect
85+
golang.org/x/tools v0.32.0 // indirect
7886
google.golang.org/protobuf v1.36.6 // indirect
7987
)
88+
89+
tool github.com/a-h/templ/cmd/templ

0 commit comments

Comments
 (0)