Skip to content

Commit abc75fa

Browse files
committed
fix: address second round of code review feedback
- Move VERSION guard into recipe to avoid global parse-time error - Centralize owner/repo via GoReleaser template variables (.Env.GITHUB_REPOSITORY_OWNER, .ProjectName) to avoid hardcoding - Remove hardcoded release.github.owner (GoReleaser auto-detects)
1 parent ffec4f6 commit abc75fa

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

.goreleaser.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ checksum:
4242

4343
dockers_v2:
4444
- images:
45-
- ghcr.io/skyoo2003/devcloud
45+
- ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/{{ .ProjectName }}
4646
dockerfile: Dockerfile.goreleaser
4747
ids:
4848
- devcloud
@@ -56,15 +56,12 @@ dockers_v2:
5656
- "latest-alpine"
5757
labels:
5858
org.opencontainers.image.created: "{{ .Date }}"
59-
org.opencontainers.image.source: "https://github.com/skyoo2003/devcloud"
59+
org.opencontainers.image.source: "https://github.com/{{ .Env.GITHUB_REPOSITORY_OWNER }}/{{ .ProjectName }}"
6060
org.opencontainers.image.title: "{{ .ProjectName }}"
6161
org.opencontainers.image.revision: "{{ .FullCommit }}"
6262
org.opencontainers.image.version: "{{ .Version }}"
6363

6464
release:
65-
github:
66-
owner: skyoo2003
67-
name: devcloud
6865
name_template: "{{ .Version }}"
6966
disable: false
7067
mode: replace

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ clean:
3434
rm -rf dist/ data/
3535

3636
changelog:
37-
ifndef VERSION
38-
$(error VERSION is required. Usage: make changelog VERSION=v0.2.0)
39-
endif
37+
@if [ -z "$(VERSION)" ]; then \
38+
echo "VERSION is required. Usage: make changelog VERSION=v0.2.0"; \
39+
exit 1; \
40+
fi
4041
@changie batch $(VERSION) && changie merge

0 commit comments

Comments
 (0)