generated from Start9Labs/hello-world-startos
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
34 lines (25 loc) · 1.22 KB
/
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
29
30
31
32
33
34
PKG_ID := $(shell yq e ".id" manifest.toml)
PKG_VERSION := $(shell yq e ".version" manifest.toml)
TS_FILES := $(shell find ./scripts -name '*.ts')
.DELETE_ON_ERROR:
all: verify
verify: $(PKG_ID).s9pk
start-sdk verify s9pk $(PKG_ID).s9pk
clean:
rm -rf docker-images
rm -f image.tar
rm -f $(PKG_ID).s9pk
rm -f scripts/*.js
# assumes /etc/embassy/config.yaml exists on local system with `host: "http://embassy-server-name.local"` configured
install: $(PKG_ID).s9pk
start-cli package install $(PKG_ID).s9pk
$(PKG_ID).s9pk: manifest.toml instructions.md LICENSE icon.png scripts/embassy.js docker-images/aarch64.tar docker-images/x86_64.tar
start-sdk pack
docker-images/aarch64.tar: Dockerfile docker_entrypoint.sh
mkdir -p docker-images
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/arm64 -o type=docker,dest=docker-images/aarch64.tar .
docker-images/x86_64.tar: Dockerfile docker_entrypoint.sh
mkdir -p docker-images
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/amd64 -o type=docker,dest=docker-images/x86_64.tar .
scripts/embassy.js: $(SCRIPTS_SRC)
deno bundle scripts/embassy.ts scripts/embassy.js