Skip to content

Commit

Permalink
fix(.goreleaser.yaml, Makefile): Update build configuration for go-mo…
Browse files Browse the repository at this point in the history
…d and version export locations

- Move go mod tidy before builds in .goreleaser.yaml
- Change version export location in gommitizen binary to internal/app/gommitizen/version.version
- Update version export in Makefile to reflect new location
- Update release process in .goreleaser.yaml for better versioning and docker image creation
  • Loading branch information
sergiotejon committed Nov 21, 2024
1 parent 42e51fa commit 59078ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ builds:
binary: gommitizen
main: ./cmd/gommitizen
ldflags:
- "-X github.com/freepik-company/gommitizen/internal/version.version={{.Version}}"
- "-X github.com/freepik-company/gommitizen/internal/app/gommitizen/version.version={{.Version}}"
env:
- CGO_ENABLED=0
goos:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bin: ./bin/gommitizen ## Build go application

./bin/gommitizen: $(SOURCE_PATHS)
go build \
-ldflags "-X github.com/freepik-company/gommitizen/internal/version.version=${CURRENT_VERSION}" \
-ldflags "-X github.com/freepik-company/gommitizen/internal/app/gommitizen/version.version=${CURRENT_VERSION}" \
-o $@ $<

install: bin ## Install gommitizen
Expand Down

0 comments on commit 59078ad

Please sign in to comment.