57 lines
1.4 KiB
Bash
57 lines
1.4 KiB
Bash
|
|
#!/bin/bash
|
||
|
|
#
|
||
|
|
# Compile Onebox for all platforms
|
||
|
|
#
|
||
|
|
|
||
|
|
set -e
|
||
|
|
|
||
|
|
VERSION=$(grep '"version"' deno.json | cut -d'"' -f4)
|
||
|
|
echo "Compiling Onebox v${VERSION} for all platforms..."
|
||
|
|
|
||
|
|
# Create dist directory
|
||
|
|
mkdir -p dist/binaries
|
||
|
|
|
||
|
|
# Compile for each platform
|
||
|
|
echo "Compiling for Linux x64..."
|
||
|
|
deno compile --allow-all --no-check \
|
||
|
|
--output "dist/binaries/onebox-linux-x64" \
|
||
|
|
--target x86_64-unknown-linux-gnu \
|
||
|
|
mod.ts
|
||
|
|
|
||
|
|
echo "Compiling for Linux ARM64..."
|
||
|
|
deno compile --allow-all --no-check \
|
||
|
|
--output "dist/binaries/onebox-linux-arm64" \
|
||
|
|
--target aarch64-unknown-linux-gnu \
|
||
|
|
mod.ts
|
||
|
|
|
||
|
|
echo "Compiling for macOS x64..."
|
||
|
|
deno compile --allow-all --no-check \
|
||
|
|
--output "dist/binaries/onebox-macos-x64" \
|
||
|
|
--target x86_64-apple-darwin \
|
||
|
|
mod.ts
|
||
|
|
|
||
|
|
echo "Compiling for macOS ARM64..."
|
||
|
|
deno compile --allow-all --no-check \
|
||
|
|
--output "dist/binaries/onebox-macos-arm64" \
|
||
|
|
--target aarch64-apple-darwin \
|
||
|
|
mod.ts
|
||
|
|
|
||
|
|
echo "Compiling for Windows x64..."
|
||
|
|
deno compile --allow-all --no-check \
|
||
|
|
--output "dist/binaries/onebox-windows-x64.exe" \
|
||
|
|
--target x86_64-pc-windows-msvc \
|
||
|
|
mod.ts
|
||
|
|
|
||
|
|
echo ""
|
||
|
|
echo "✓ Compilation complete!"
|
||
|
|
echo ""
|
||
|
|
echo "Binaries:"
|
||
|
|
ls -lh dist/binaries/
|
||
|
|
echo ""
|
||
|
|
echo "Next steps:"
|
||
|
|
echo "1. Test binaries on their respective platforms"
|
||
|
|
echo "2. Create git tag: git tag v${VERSION}"
|
||
|
|
echo "3. Push tag: git push origin v${VERSION}"
|
||
|
|
echo "4. Upload binaries to Gitea release"
|
||
|
|
echo "5. Publish to npm: pnpm publish"
|