diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 7c90e4c..ef0204c 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -42,35 +42,11 @@ jobs: mkdir -p dist/rocclaw/scripts cp scripts/verify-native-runtime.mjs dist/rocclaw/scripts/ - # Create startup script - cat > dist/rocclaw/start.sh << 'EOF' - #!/bin/bash - set -e - - echo "Starting rocCLAW..." - echo "Make sure you have Node.js 20.9+ installed" - - # Install production dependencies - npm ci --production - - # Start the server - node server/index.js - EOF + # Copy startup scripts from the repo (not generated inline) + cp start.sh dist/rocclaw/ + cp start.bat dist/rocclaw/ chmod +x dist/rocclaw/start.sh - # Create Windows startup script - cat > dist/rocclaw/start.bat << 'EOF' - @echo off - echo Starting rocCLAW... - echo Make sure you have Node.js 20.9+ installed - - REM Install production dependencies - call npm ci --production - - REM Start the server - node server/index.js - EOF - # Create tar.gz archive cd dist tar -czf rocclaw-linux-x64.tar.gz rocclaw diff --git a/README.md b/README.md index efab007..d385fbc 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ Download ready-to-run packages from [GitHub Releases](https://github.com/simonca **Linux/macOS:** ```bash -# Download and extract latest release +# Download and extract the latest release curl -L -o rocclaw.tar.gz https://github.com/simoncatbot/rocclaw/releases/latest/download/rocclaw-linux-x64.tar.gz tar -xzf rocclaw.tar.gz cd rocclaw diff --git a/start.bat b/start.bat new file mode 100644 index 0000000..bd11a3c --- /dev/null +++ b/start.bat @@ -0,0 +1,11 @@ +@echo off +echo Starting rocCLAW... +echo Make sure you have Node.js 20.9+ installed + +REM Install dependencies (--include=dev required so TypeScript is available to +REM transpile next.config.ts at startup; omitting dev deps causes a MODULE_NOT_FOUND +REM error for 'typescript' in the Next.js config transpiler) +call npm ci --include=dev + +REM Start the server +node server/index.js diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..cb54d49 --- /dev/null +++ b/start.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +echo "Starting rocCLAW..." +echo "Make sure you have Node.js 20.9+ installed" + +# Install dependencies (--include=dev required so TypeScript is available to +# transpile next.config.ts at startup; omitting dev deps causes a MODULE_NOT_FOUND +# error for 'typescript' in the Next.js config transpiler) +npm ci --include=dev + +# Start the server +node server/index.js