diff options
| author | ivar <i@oiee.no> | 2026-06-22 00:46:09 +0200 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2026-06-22 00:46:09 +0200 |
| commit | b8b6e229281be13258715870ddd0c2e1866dee12 (patch) | |
| tree | cc136a2d0c2d9c031ec0b21f62c8a9f302e0ff57 /cli | |
| parent | 1aa60ed7f0b0af6c55df4a32bf2620934df63e6d (diff) | |
| download | sparebank1-actualbudget-b8b6e229281be13258715870ddd0c2e1866dee12.tar.xz sparebank1-actualbudget-b8b6e229281be13258715870ddd0c2e1866dee12.zip | |
Diffstat (limited to 'cli')
| -rwxr-xr-x | cli/deploy.sh | 22 | ||||
| -rw-r--r-- | cli/src/config.ts | 16 |
2 files changed, 23 insertions, 15 deletions
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 |
