robosats-startos/Makefile
2022-09-09 10:16:36 -04:00

29 lines
827 B
Makefile

PKG_ID := $(shell yq e ".id" manifest.yaml)
PKG_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
verify: $(PKG_ID).s9pk
embassy-sdk verify s9pk $(PKG_ID).s9pk
install: all
embassy-cli package install $(PKG_ID).s9pk
clean:
rm -f image.tar
rm -f $(PKG_ID).s9pk
rm -f scripts/*.js
scripts/embassy.js: $(TS_FILES)
deno bundle scripts/embassy.ts scripts/embassy.js
image.tar: Dockerfile docker_entrypoint.sh
docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/arm64 -o type=docker,dest=image.tar .
$(PKG_ID).s9pk: check-web.sh manifest.yaml instructions.md icon.png LICENSE scripts/embassy.js image.tar
embassy-sdk pack