From 3028d25a013f69b839a0de539ec89ee02f401d7d Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Thu, 19 Sep 2024 17:44:04 +0100 Subject: [PATCH] build: add a snap target to the Makefile --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b3376d40ff..5b0e059240 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all crossbuild build build-debug +.PHONY: all crossbuild build build-debug snap all: crossbuild @@ -18,3 +18,12 @@ build: build-debug: go build -o parca-agent-debug -buildvcs=false -ldflags="-extldflags=-static" -tags osusergo,netgo -gcflags "all=-N -l" + +snap: crossbuild + cp ./dist/metadata.json snap/local/metadata.json + + cp ./dist/linux-amd64_linux_amd64_v1/parca-agent snap/local/parca-agent + snapcraft pack --verbose --build-for amd64 + + cp ./dist/linux-arm64_linux_arm64/parca-agent snap/local/parca-agent + snapcraft pack --verbose --build-for arm64 \ No newline at end of file