GitRoot

craft your forge, build your project, grow your community freely
 1# SPDX-FileCopyrightText: 2025 Romain Maneschi <romain@gitroot.dev>
 2#
 3# SPDX-License-Identifier: EUPL-1.2
 4
 5NAME=apex
 6VERSION=0.0.4
 7
 8all: clean test build
 9
10resources/gitmojis.json:
11	./updateResources.sh
12
13resources: resources/gitmojis.json
14
15${NAME}-${VERSION}.wasm:
16	tinygo build -buildmode=c-shared -o ${NAME}-${VERSION}.wasm -scheduler=none --no-debug -target=wasip1 ./
17
18${NAME}_markdown-${VERSION}.wasm:
19	tinygo build -buildmode=c-shared -o ${NAME}_markdown-${VERSION}.wasm -scheduler=none --no-debug -target=wasip1 ./markdown/
20
21${NAME}_code-${VERSION}.wasm:
22	tinygo build -buildmode=c-shared -o ${NAME}_code-${VERSION}.wasm -scheduler=none --no-debug -target=wasip1 ./code/
23
24build: resources ${NAME}-${VERSION}.wasm ${NAME}_markdown-${VERSION}.wasm ${NAME}_code-${VERSION}.wasm
25
26test:
27	go test -race ./...
28
29clean:
30	rm -rf ${NAME}-${VERSION}.wasm
31	go clean
32	rm -rf resources/gitmojis.json