forked from owenthereal/upterm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve gorelease process (owenthereal#227)
* Improve gorelease * Ignore `bin`
1 parent
0855a34
commit f3d09b2
Showing
28 changed files
with
100 additions
and
89 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 |
---|---|---|
|
@@ -5,3 +5,4 @@ release | |
*.tfstate | ||
*.tfstate.backup | ||
dist | ||
bin |
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 |
---|---|---|
@@ -1,35 +1,55 @@ | ||
SHELL=/bin/bash -o pipefail | ||
|
||
.PHONY: docs build proto client install test vet chart | ||
BIN_DIR ?= $(CURDIR)/bin | ||
export PATH := $(BIN_DIR):$(PATH) | ||
|
||
.PHONY: tools | ||
tools: | ||
rm -rf $(BIN_DIR) && mkdir -p $(BIN_DIR) | ||
# goreleaser | ||
GOBIN=$(BIN_DIR) go install github.com/goreleaser/goreleaser@latest | ||
|
||
.PHONY: generate | ||
generate: proto | ||
|
||
.PHONY: docs | ||
docs: | ||
rm -rf docs && mkdir docs | ||
rm -rf etc && mkdir -p etc/man/man1 && mkdir -p etc/completion | ||
go run cmd/gendoc/main.go | ||
|
||
.PHONY: proto | ||
proto: | ||
docker run -v $(CURDIR)/server:/defs namely/protoc-all -f server.proto -l go --go-source-relative -o . | ||
docker run -v $(CURDIR)/host/api:/defs namely/protoc-all -f api.proto -l go --go-source-relative -o . | ||
|
||
.PHONY: build | ||
build: | ||
go build -o build/upterm ./cmd/upterm | ||
go build -o build/uptermd ./cmd/uptermd | ||
go build -o $(BIN_DIR)/upterm ./cmd/upterm | ||
go build -o $(BIN_DIR)/uptermd ./cmd/uptermd | ||
|
||
.PHONY: install | ||
install: | ||
go install ./cmd/... | ||
|
||
TAG ?= latest | ||
.PHONY: docker_build | ||
docker_build: | ||
docker build -t ghcr.io/owenthereal/upterm/uptermd:$(TAG) -f Dockerfile.uptermd . | ||
|
||
.PHONY: docker_push | ||
docker_push: docker_build | ||
docker push ghcr.io/owenthereal/upterm/uptermd:$(TAG) | ||
|
||
GO_TEST_FLAGS ?= "" | ||
.PHONY: test | ||
test: | ||
go test ./... -timeout=120s -coverprofile=c.out -covermode=atomic -count=1 -race -v $(GO_TEST_FLAGS) | ||
|
||
.PHONY: vet | ||
vet: | ||
docker run --rm -v $(CURDIR):/app:z -w /app golangci/golangci-lint:latest golangci-lint run -v --timeout 15m | ||
|
||
.PHONY: goreleaser | ||
goreleaser: | ||
goreleaser release --clean --snapshot --skip=publish |
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
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
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
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
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
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
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
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
Oops, something went wrong.