Tidy repo

This commit is contained in:
Malachi Soord
2023-03-16 21:21:17 +01:00
parent 161ec76eb9
commit cec05c3281
4 changed files with 18 additions and 20 deletions
+7 -2
View File
@@ -1,9 +1,14 @@
.PHONY: build
PROJECT?=github.com/edgebox-iot/edgeboxctl
RELEASE ?= dev
COMMIT := $(shell git rev-parse --short HEAD)
BUILD_DATE := $(shell date -u '+%Y-%m-%d_%H:%M:%S')
BUILD_DIR = bin
GOOS := $(shell go env GOOS)
GOARCH := $(shell go env GOARCH)
build-all:
GOOS=linux GOARCH=amd64 make build
@@ -15,7 +20,7 @@ build-prod:
build-cloud:
GOOS=linux GOARCH=amd64 RELEASE=cloud make build
build:
build
@echo "Building ${GOOS}-${GOARCH}"
GOOS=${GOOS} GOARCH=${GOARCH} go build \
-trimpath -ldflags "-s -w -X ${PROJECT}/internal/diagnostics.Version=${RELEASE} \
@@ -46,4 +51,4 @@ install-prod: build-prod
cp ./edgeboxctl/edgeboxctl.service /lib/systemd/system/edgeboxctl.service
systemctl daemon-reload
@echo "Edgeboxctl installed successfully"
@echo "To start edgeboxctl run: systemctl start edgeboxctl"
@echo "To start edgeboxctl run: systemctl start edgeboxctl"