Skip to content

Commit ef03db0

Browse files
appleboyclaude
andcommitted
chore(build): remove unused templ dependencies
- Remove TEMPL_VERSION variable, install-templ, generate, and watch targets from Makefile - Remove generate dependency from build, test, and cross-compile targets - Remove templ template cleanup from clean target - Remove Run Generate step from CI testing workflow - Remove templ references from CLAUDE.md documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a370115 commit ef03db0

3 files changed

Lines changed: 5 additions & 28 deletions

File tree

.github/workflows/testing.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ jobs:
3232
with:
3333
go-version: ${{ matrix.go }}
3434

35-
- name: Run Generate
36-
run: |
37-
make generate
38-
3935
- name: Setup golangci-lint
4036
uses: golangci/golangci-lint-action@v9
4137
with:

CLAUDE.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ make dev # Uses air for live reload
5454
### Other Commands
5555

5656
```bash
57-
# Generate files (templ templates if any)
58-
make generate
59-
6057
# Clean build artifacts
6158
make clean
6259

@@ -201,7 +198,6 @@ goreleaser uses these to build versioned binaries with naming pattern:
201198
- **Testing**: Runs on Ubuntu and macOS with Go 1.25 and 1.26
202199
- **Linting**: Uses golangci-lint v2.9 with config from `.golangci.yml`
203200
- **Release**: goreleaser builds for multiple platforms (see `.goreleaser.yaml`)
204-
- **Generate step**: Always run `make generate` before building (for templ templates)
205201

206202
## Go Modules
207203

Makefile

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ GO ?= go
22
EXECUTABLE := device-cli
33
GOFILES := $(shell find . -type f -name "*.go")
44
TAGS ?=
5-
TEMPL_VERSION ?= latest
65

76
ifneq ($(shell uname), Darwin)
87
EXTLDFLAGS = -extldflags "-static" $(null)
@@ -19,7 +18,7 @@ COMMIT ?= $(shell git rev-parse --short HEAD)
1918

2019
LDFLAGS ?=
2120
## build: build the authgate binary
22-
build: generate $(EXECUTABLE)
21+
build: $(EXECUTABLE)
2322

2423
$(EXECUTABLE): $(GOFILES)
2524
$(GO) build -v -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o bin/$@ .
@@ -39,7 +38,7 @@ install: $(GOFILES)
3938
$(GO) install -v -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)'
4039

4140
## test: run tests
42-
test: generate
41+
test:
4342
@$(GO) test -v -cover -coverprofile coverage.txt ./... && echo "\n==>\033[32m Ok\033[m\n" || exit 1
4443

4544
## coverage: view test coverage in browser
@@ -59,39 +58,26 @@ lint: install-golangci-lint
5958
golangci-lint run
6059

6160
## build_linux_amd64: build the authgate binary for linux amd64
62-
build_linux_amd64: generate
61+
build_linux_amd64:
6362
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -a -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/linux/amd64/$(EXECUTABLE) .
6463

6564
## build_linux_arm64: build the authgate binary for linux arm64
66-
build_linux_arm64: generate
65+
build_linux_arm64:
6766
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(GO) build -a -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/linux/arm64/$(EXECUTABLE) .
6867

6968
## clean: remove build artifacts and test coverage
7069
clean:
7170
rm -rf bin/ release/ coverage.txt
72-
find internal/templates -name "*_templ.go" -delete
7371

7472
## rebuild: clean and build
7573
rebuild: clean build
7674

7775
.PHONY: help build install test coverage fmt lint clean rebuild
7876
.PHONY: build_linux_amd64 build_linux_arm64
79-
.PHONY: install-templ generate watch air dev
77+
.PHONY: air dev
8078
.PHONY: install-golangci-lint mod-download mod-tidy mod-verify check-tools version
8179
.PHONY: docker-build docker-run
8280

83-
## install-templ: install templ CLI if not installed
84-
install-templ:
85-
@command -v templ >/dev/null 2>&1 || $(GO) install github.com/a-h/templ/cmd/templ@$(TEMPL_VERSION)
86-
87-
## generate: run templ generate to compile .templ files
88-
generate: install-templ
89-
templ generate
90-
91-
## watch: watch mode for automatic regeneration
92-
watch: install-templ
93-
templ generate --watch
94-
9581
## help: print this help message
9682
help:
9783
@echo 'Usage:'
@@ -112,7 +98,6 @@ mod-verify:
11298
## check-tools: verify required tools are installed
11399
check-tools:
114100
@command -v $(GO) >/dev/null 2>&1 || (echo "Go not found" && exit 1)
115-
@command -v templ >/dev/null 2>&1 || echo "templ not installed (run: make install-templ)"
116101
@command -v golangci-lint >/dev/null 2>&1 || echo "golangci-lint not installed (run: make install-golangci-lint)"
117102

118103
## version: display version information

0 commit comments

Comments
 (0)