Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ jobs:
- run: |
go version
go get
- run: make build

- run: |
make build
make sha256sum

- name: Extract short commit SHA
id: short-sha
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ jobs:
go version
go get

- run: make build
- run: |
make build
make sha256sum

- working-directory: ./example/echo-server
run: make build
run: |
make build
make sha256sum

- name: Create release
env:
Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@ build_%_arm64: GOARCH = arm64

COMMIT = $(shell git rev-parse --short HEAD || true)
TAG = $(shell git describe --tags --abbrev=0 HEAD 2>/dev/null || true)
BINPATH = bin/$(TARGET)_$(GOOS)_$(GOARCH)$(EXT)
BINDIR = bin
BINPATH = $(BINDIR)/$(TARGET)_$(GOOS)_$(GOARCH)$(EXT)

build_%:
export GOOS=$(GOOS) GOARCH=$(GOARCH)

go build -o $(BINPATH) \
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(BINPATH) \
-ldflags "-X main.buildCommit=$(COMMIT) -X main.buildVersion=$(TAG)" \
-gcflags "./...=-m" \
-gcflags "./pkg/http2=" \
./cmd

chmod +x $(BINPATH)

sha256sum:
cd $(BINDIR) && sha256sum $(TARGET)_* > $(TARGET).sha256sum

PKG_LIST = $(shell go list ./... | grep -v github.com/wi1dcard/fingerproxy/pkg/http2)
test:
@go test -v $(PKG_LIST)
Expand Down
10 changes: 6 additions & 4 deletions example/echo-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ build_%_amd64: GOARCH = amd64
build_%_arm: GOARCH = arm
build_%_arm64: GOARCH = arm64

BINPATH = bin/$(TARGET)_$(GOOS)_$(GOARCH)$(EXT)
BINDIR = bin
BINPATH = $(BINDIR)/$(TARGET)_$(GOOS)_$(GOARCH)$(EXT)

build_%:
export GOOS=$(GOOS) GOARCH=$(GOARCH)

go build -o $(BINPATH) .
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(BINPATH) .

chmod +x $(BINPATH)

sha256sum:
cd $(BINDIR) && sha256sum $(TARGET)_* > $(TARGET).sha256sum
Loading