Skip to content

Commit

Permalink
Merge pull request #1716 from stripe/pakrym/Replace_version_placehold…
Browse files Browse the repository at this point in the history
…er_with_an_actual_version_during_format

Replace version placeholder with an actual version during format
  • Loading branch information
pakrym-stripe authored Aug 17, 2023
2 parents 2831d95 + 63e1a1c commit 13f96a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ update-version:
@perl -pi -e 's|github.com/stripe/stripe-go/v\d+|github.com/stripe/stripe-go/v$(MAJOR_VERSION)|' go.mod
@find . -name '*.go' -exec perl -pi -e 's|github.com/stripe/stripe-go/v\d+|github.com/stripe/stripe-go/v$(MAJOR_VERSION)|' {} +

CURRENT_MAJOR_VERSION := $(shell cat VERSION | sed 's/\..*//')
codegen-format:
go fmt ./...
go install golang.org/x/tools/cmd/goimports@latest && goimports -w example/generated_examples_test.go
@find . -name '*.go' -exec perl -pi -e 's|github.com/stripe/stripe-go/\[MAJOR_VERSION\]|github.com/stripe/stripe-go/v$(CURRENT_MAJOR_VERSION)|' {} +

.PHONY: codegen-format update-version

0 comments on commit 13f96a7

Please sign in to comment.