From b8b6e229281be13258715870ddd0c2e1866dee12 Mon Sep 17 00:00:00 2001 From: ivar Date: Mon, 22 Jun 2026 00:46:09 +0200 Subject: Remove webapp --- cli/deploy.sh | 22 ++++++++++++++++++++++ cli/src/config.ts | 16 +--------------- 2 files changed, 23 insertions(+), 15 deletions(-) create mode 100755 cli/deploy.sh (limited to 'cli') diff --git a/cli/deploy.sh b/cli/deploy.sh new file mode 100755 index 0000000..82c416e --- /dev/null +++ b/cli/deploy.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -euo pipefail + +REMOTE="contabo-fast-1" +REMOTE_PATH="/home/asgeir/services/local/sb1-actual-tool/exe" +BINARY_NAME="sb1-actual" +LOCAL_BINARY="./dist/${BINARY_NAME}" + +echo "Building binary..." +mkdir -p dist +bun build --compile src/index.ts --target=bun-linux-x64 --outfile "${LOCAL_BINARY}" + +echo "Backing up old binary on remote (if exists)..." +ssh "${REMOTE}" "[ -f '${REMOTE_PATH}' ] && mv '${REMOTE_PATH}' '${REMOTE_PATH}.bak' || true" + +echo "Uploading binary..." +scp "${LOCAL_BINARY}" "${REMOTE}:${REMOTE_PATH}" + +echo "Setting executable permissions..." +ssh "${REMOTE}" "chmod +x '${REMOTE_PATH}'" + +echo "Done. Binary deployed to ${REMOTE}:${REMOTE_PATH}" diff --git a/cli/src/config.ts b/cli/src/config.ts index e82d92a..a00552d 100644 --- a/cli/src/config.ts +++ b/cli/src/config.ts @@ -37,18 +37,4 @@ export function loadConfig(): Config { export function saveConfig(config: Config): void { mkdirSync(CONFIG_DIR, { recursive: true }) writeFileSync(CONFIG_PATH, JSON.stringify(config, null, 2)) -} - -const exampleConfig: Config = { - sb1: { - clientId: "YOUR_CLIENT_ID", - clientSecret: "YOUR_CLIENT_SECRET", - finInst: "YOUR_FIN_INST" - }, - actual: { - host: "http://localhost:5006", - password: "your-password", - fileId: "your-budget-file-id" - }, - mappings: [] -} +} \ No newline at end of file -- cgit v1.3