From a60a41f7f1db6395e5ff02a69bec6183998d2d47 Mon Sep 17 00:00:00 2001 From: Paulo Truta Date: Wed, 4 Dec 2024 15:27:24 +0100 Subject: [PATCH] Added run command and reverted build-all to old logic, added run vscode task --- .vscode/tasks.json | 25 +++++++++++++++++++++++++ Makefile | 12 +++++++----- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index b46ea4c..9d228ef 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,6 +1,21 @@ { "version": "2.0.0", "tasks": [ + { + "label": "Build", + "type": "shell", + "command": "make", + "args": ["build"], + "options": { + "cwd": "${workspaceFolder}" + + }, + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + }, { "label": "Build All", "type": "shell", @@ -97,6 +112,16 @@ }, "problemMatcher": [] }, + { + "label": "Run", + "type": "shell", + "command": "make", + "args": ["run"], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": [] + }, { "label": "Install", "type": "shell", diff --git a/Makefile b/Makefile index 5202284..594e181 100644 --- a/Makefile +++ b/Makefile @@ -10,13 +10,11 @@ GOARCH := $(shell go env GOARCH) build-all: - @echo "\nšŸ—ļø Building all architectures and release modes" + @echo "\nšŸ—ļø Building all architectures for ${RELEASE} mode" @echo "šŸŸ” This will build all supported architectures and release combinations. It can take a while...\n" - GOARCH=amd64 make build - GOARCH=arm make build - RELEASE=prod make build - RELEASE=cloud make build + GOOS=linux GOARCH=amd64 make build + GOOS=linux GOARCH=arm make build @echo "\nšŸŸ¢ All builds completed and available at ./bin/ \n" @@ -62,6 +60,10 @@ test: test-with-coverage: go test -tags=unit -timeout=600s -v ./... -coverprofile=coverage.out +run: + @echo "\nšŸš€ Running edgeboxctl\n" + ./bin/edgeboxctl-${GOOS}-${GOARCH} + install: @echo "šŸ“¦ Installing edgeboxctl service (${RELEASE}) for ${GOOS} (${GOARCH})\n"