#!/bin/bash

current_dir=$(pwd)

pushd ../eve-lite

bun build src/eventPlugin.ts --compile
bun build --production --bytecode --compile index.ts
mv eventPlugin $current_dir/eve_executables/eventPlugin
mv index $current_dir/eve_executables/eve-lite
chmod +x $current_dir/eve_executables/eve-lite
chmod +x $current_dir/eve_executables/eventPlugin

popd

pushd ../eve-lite-ui
bun run build:linux
mv dist/eve-lite-1.1.0.AppImage $current_dir/eve_executables/eve-lite-ui.AppImage
chmod +x $current_dir/eve_executables/eve-lite-ui.AppImage

popd

just build
just push-remote
