1
0

Set up assets in build process

This commit is contained in:
2026-03-22 15:00:45 +01:00
parent b117f3290b
commit 202e1a58ec
2 changed files with 25 additions and 5 deletions

View File

@@ -104,10 +104,6 @@ jobs:
include:
- os: ubuntu-latest
platform: linux
- os: macos-latest
platform: mac
- os: windows-latest
platform: win
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
@@ -118,6 +114,21 @@ jobs:
with:
node-version: '22'
- name: Build WASM binary
run: |
cd kobopatch-wasm
./setup.sh
./build.sh
- name: Set up NickelMenu assets
run: nickelmenu/setup.sh
- name: Set up KOReader assets
run: koreader/setup.sh
- name: Set up Readerly assets
run: readerly/setup.sh
- name: Build frontend
run: |
cd web

View File

@@ -16,6 +16,9 @@ elif [ -x "$LOCAL_GO_DIR/bin/go" ] && "$LOCAL_GO_DIR/bin/go" version 2>/dev/null
else
# Detect platform and architecture
OS="$(uname -s | tr '[:upper:]' '[:lower:]')"
case "$OS" in
msys*|mingw*) OS="windows" ;;
esac
ARCH="$(uname -m)"
case "$ARCH" in
x86_64) ARCH="amd64" ;;
@@ -28,7 +31,13 @@ else
echo "Downloading Go ${GO_VERSION} for ${OS}/${ARCH}..."
rm -rf "$LOCAL_GO_DIR"
if [ "$OS" = "windows" ]; then
curl -fsSL "https://go.dev/dl/go${GO_VERSION}.${OS}-${ARCH}.zip" -o "$SCRIPT_DIR/go.zip"
unzip -q "$SCRIPT_DIR/go.zip" -d "$SCRIPT_DIR"
rm "$SCRIPT_DIR/go.zip"
else
curl -fsSL "https://go.dev/dl/go${GO_VERSION}.${OS}-${ARCH}.tar.gz" | tar -xz -C "$SCRIPT_DIR"
fi
export GOROOT="$LOCAL_GO_DIR"
export PATH="$LOCAL_GO_DIR/bin:$PATH"
fi