Skip to content

Commit

Permalink
build: add a snap target to the Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsgruk committed Sep 19, 2024
1 parent c6c0400 commit 3028d25
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: all crossbuild build build-debug
.PHONY: all crossbuild build build-debug snap

all: crossbuild

Expand All @@ -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

0 comments on commit 3028d25

Please sign in to comment.