Skip to content

Commit

Permalink
Add support for aarch64 in snap
Browse files Browse the repository at this point in the history
  • Loading branch information
caspiano committed Dec 20, 2022
1 parent 1ce0cd0 commit 8b12d8c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion snapcraft/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
OUTPUT_DIR = build

ifeq ($(arch),x86_64)
SNAP_BUILD_FOR = --build-for amd64
else ifeq ($(arch),aarch64)
SNAP_BUILD_FOR = --build-for arm64
else
$(error Expected arch to be one of 'x86_64', or 'aarch64', got: $(arch))
endif

.PHONY: all
all: snap/snapcraft.yaml
mkdir -p $(OUTPUT_DIR)
snapcraft
snapcraft $(SNAP_BUILD_FOR)
mv *.snap $(OUTPUT_DIR)

.PHONY: snap/snapcraft.yaml
Expand Down
3 changes: 3 additions & 0 deletions snapcraft/snap/local/snapcraft.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ apps:
shards:
command: bin/shards

architectures:
- build-for: [amd64, arm64]

parts:
crystal:
plugin: dump
Expand Down

0 comments on commit 8b12d8c

Please sign in to comment.