From 6583ccf24c33ca89deedf70dc6a8f47047e50e6c Mon Sep 17 00:00:00 2001 From: bilalcaliskan Date: Sat, 20 Jan 2024 19:45:32 +0300 Subject: [PATCH] fix: fix build phase on ci/cd --- .github/workflows/pr.yml | 6 ++++-- .github/workflows/push.yml | 6 ++++-- Makefile | 11 ++++++++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 85f049e..bf3c317 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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 diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 3b9753f..50ced26 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -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 diff --git a/Makefile b/Makefile index 08877e3..085a23b 100644 --- a/Makefile +++ b/Makefile @@ -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