From 3640b823764ba765af7f86ec3131f093daab5b28 Mon Sep 17 00:00:00 2001 From: Sam Therapy Date: Fri, 9 Sep 2022 01:48:47 +0200 Subject: [PATCH] wip: snap Why? Why not? Signed-off-by: Sam Therapy --- snapcraft.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 snapcraft.yaml diff --git a/snapcraft.yaml b/snapcraft.yaml new file mode 100644 index 0000000..c6d6b7a --- /dev/null +++ b/snapcraft.yaml @@ -0,0 +1,30 @@ +# You might ask, why make a snap? +# why not? + +name: awl +base: core20 +version: '0.1' +summary: A command-line DNS query tool. +description: | + awl is a command line DNS tool, much like dig and drill. + +grade: devel +confinement: strict + +apps: + awl: + command: bin/awl + plugs: + - network + +parts: + awl: + plugin: go + source-type: git + source: https://git.froth.zone/sam/awl + override-build: | +# For some reason it's always dirty??? + go build -ldflags="-s -w -X=main.version=$(git describe --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || echo 'UNKNOWN')+snap" -trimpath -o awl + install -d $SNAPCRAFT_PART_INSTALL/bin + cp -av awl $SNAPCRAFT_PART_INSTALL/bin/ + ls -l $SNAPCRAFT_PART_INSTALL/bin/awl \ No newline at end of file