-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add goreleaser to perform release (#4)
- Loading branch information
1 parent
5aba8d5
commit 20017a7
Showing
4 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/kroki | ||
/dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
project_name: kroki-cli | ||
|
||
before: | ||
hooks: | ||
- go mod download | ||
|
||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
- binary: kroki | ||
goos: | ||
- windows | ||
- darwin | ||
- linux | ||
- openbsd | ||
goarch: | ||
- amd64 | ||
|
||
archive: | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
release: | ||
github: | ||
owner: yuzutech | ||
name: kroki-cli | ||
draft: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
version := $(shell git describe --exact-match --tags $(git log -n1 --pretty='%h') 2> /dev/null || echo 'latest') | ||
vcs_ref := $(shell git rev-parse HEAD) | ||
|
||
GO_FILES = $(shell find . -type f -name '*.go') | ||
|
||
.PHONY: all | ||
all: clean kroki | ||
|
||
kroki: $(GO_FILES) | ||
go build -o $@ -ldflags "-s -w -X main.version=${version} -X main.commit=${vcs_ref}" | ||
|
||
.PHONY: lint | ||
lint: $(GO_FILES) | ||
golangci-lint run ./... | ||
|
||
.PHONY: test | ||
test: $(GO_FILES) | ||
go test -race ./... | ||
|
||
.PHONY: clean | ||
clean: | ||
go clean | ||
rm -rf kroki |