Skip to content

Commit

Permalink
fix: fix build phase on ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
bilalcaliskan committed Jan 20, 2024
1 parent e2bab43 commit 6583ccf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,7 @@ jobs:
with:
go-version-file: "go.mod"
cache: true
- name: Build
run: make -s build
- name: Build daemon
run: make -s build-daemon
- name: Build CLI
run: make -s build-cli
6 changes: 4 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ jobs:
with:
go-version-file: "go.mod"
cache: true
- name: Build
run: make -s build
- name: Build daemon
run: make -s build-daemon
- name: Build CLi
run: make -s build-cli

tag:
runs-on: ubuntu-latest
Expand Down
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,15 @@ test-coverage: test
go tool cover -html=coverage.txt -o cover.html
open cover.html

.PHONY: build
.PHONY: build-daemon
build: vendor
$(info building binary...)
go build -o bin/main main.go || (echo an error while building binary, exiting!; sh -c 'exit 1';)
$(info building daemon binary...)
go build -o bin/split-the-tunnel cmd/daemon/daemon.go || (echo an error while building daemon binary, exiting!; sh -c 'exit 1';)

.PHONY: build-cli
build: vendor
$(info building cli binary...)
go build -o bin/stt-cli cmd/cli/cli.go || (echo an error while building cli binary, exiting!; sh -c 'exit 1';)

.PHONY: run
run: vendor
Expand Down

0 comments on commit 6583ccf

Please sign in to comment.