robosats-startos/Makefile
Dread ccf000b094 update upstream to 0.3.3 (#6)
Co-authored-by: islandbitcoin <dread@start9.com>
2023-01-16 14:01:15 -05:00

35 lines
1.2 KiB
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: $(PKG_ID).s9pk
embassy-cli package install $(PKG_ID).s9pk
clean:
rm -rf docker-images
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
docker-images/x86_64.tar: Dockerfile docker_entrypoint.sh
mkdir -p docker-images
docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/amd64 --build-arg PLATFORM=amd64 -o type=docker,dest=docker-images/x86_64.tar .
docker-images/aarch64.tar: Dockerfile docker_entrypoint.sh
mkdir -p docker-images
docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/arm64 --build-arg PLATFORM=arm64 -o type=docker,dest=docker-images/aarch64.tar .
$(PKG_ID).s9pk: manifest.yaml instructions.md LICENSE icon.png scripts/embassy.js docker-images/aarch64.tar docker-images/x86_64.tar
embassy-sdk pack