This repository has been archived on 2024-11-01. You can view files and clone it, but cannot push or open issues or pull requests.
eternity-web/build.sh

13 lines
593 B
Bash
Raw Normal View History

2024-10-02 10:47:29 -07:00
#!/bin/sh
path=$(realpath "$(dirname "$0")") || exit 1
resourceDir="$path/../../resources/0f31fa2d-43ca-410f-8148-239b298112b3"
rm -rf "$resourceDir" || exit 1
rm -rf "$path/../../services/eternity-web.fgs" || exit 1
cd "$path" || exit 1
go build -o "$path/../../services/eternity-web.fgs" --buildmode=plugin -ldflags "-s -w" || exit 1
cd "$path/resources/wasm/oauth" || exit 1
GOOS=js GOARCH=wasm go build -o "$resourceDir/static/wasm/oauth.wasm" -ldflags "-s -w" || exit 1
2024-10-02 10:47:29 -07:00
cp -r "$path/resources/static" "$resourceDir/" || exit 1
cp -r "$path/resources/templates" "$resourceDir/" || exit 1