-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
28 lines (20 loc) · 865 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
ID_NAME := $(shell yq e ".id" manifest.yaml)
VERSION := $(shell yq e ".version" manifest.yaml)
TS_FILES := $(shell find ./ -name \*.ts)
# delete the target of a rule if it has changed and its recipe exits with a nonzero exit status
.DELETE_ON_ERROR:
all: verify
install: all
embassy-cli package install $(ID_NAME).s9pk
verify: $(ID_NAME).s9pk
embassy-sdk verify s9pk $(ID_NAME).s9pk
clean:
rm -f image.tar
rm -f $(ID_NAME).s9pk
rm -f scripts/*.js
$(ID_NAME).s9pk: manifest.yaml instructions.md icon.svg LICENSE scripts/embassy.js image.tar
embassy-sdk pack
image.tar: Dockerfile docker_entrypoint.sh
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --tag start9/$(ID_NAME)/main:$(VERSION) --platform=linux/arm64/v8 -o type=docker,dest=image.tar -f ./Dockerfile .
scripts/embassy.js: $(TS_FILES)
deno bundle scripts/embassy.ts scripts/embassy.js