Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Jan 3, 2024
1 parent f15dead commit 61bd92b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ install:

.PHONY: show-version
show-version: $(GOBIN)/gobump
@gobump show -r .
gobump show -r .

$(GOBIN)/gobump:
@cd && go get github.com/x-motemen/gobump/cmd/gobump
go install github.com/x-motemen/gobump/cmd/gobump@latest

.PHONY: cross
cross: $(GOBIN)/goxz
goxz -n $(BIN) -pv=v$(VERSION) -build-ldflags=$(BUILD_LDFLAGS) .

$(GOBIN)/goxz:
cd && go get github.com/Songmu/goxz/cmd/goxz
go install github.com/Songmu/goxz/cmd/goxz@latest

.PHONY: test
test: build
Expand All @@ -44,18 +44,18 @@ bump: $(GOBIN)/gobump
ifneq ($(shell git status --porcelain),)
$(error git workspace is dirty)
endif
ifneq ($(shell git rev-parse --abbrev-ref HEAD),master)
$(error current branch is not master)
ifneq ($(shell git rev-parse --abbrev-ref HEAD),main)
$(error current branch is not main)
endif
@gobump up -w .
git commit -am "bump up version to $(VERSION)"
git tag "v$(VERSION)"
git push origin master
git push origin main
git push origin "refs/tags/v$(VERSION)"

.PHONY: upload
upload: $(GOBIN)/ghr
ghr "v$(VERSION)" goxz

$(GOBIN)/ghr:
cd && go get github.com/tcnksm/ghr
go install github.com/tcnksm/ghr@latest

0 comments on commit 61bd92b

Please sign in to comment.