From e20a484ebce395eaf0e19949f5c2c02e324947a6 Mon Sep 17 00:00:00 2001 From: cclohmar Date: Sat, 30 May 2026 15:53:24 +0000 Subject: [PATCH] chore: rename binary from receiptnext to app - Binary output changed from 'receiptnext' to 'app' - Release assets renamed to app-linux-amd64 / app-linux-arm64 - install.sh, Makefile, README.md updated to reference 'app' - contrib/receiptnext.service uses /opt/receiptnext/app - Systemd service updated to ExecStart=/opt/receiptnext/app --- Makefile | 2 +- README.md | 22 +++++++++++----------- build-all.sh | 4 ++-- contrib/receiptnext.service | 4 ++-- install.sh | 14 +++++++------- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 51bc7dd..8c7b224 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # ReceiptNext — AI-Powered Expense Tracker # Makefile for build, install, and deployment -BINARY = receiptnext +BINARY = app OUTDIR = dist VERSION = v1.0.0 LDFLAGS = -s -w diff --git a/README.md b/README.md index 3a42d93..4c0137b 100644 --- a/README.md +++ b/README.md @@ -55,14 +55,14 @@ Pre-compiled static binaries are on the [Releases page](https://git.lohmar.co.uk ```bash # Linux amd64 -curl -L -o receiptnext https://git.lohmar.co.uk/cclohmar/ReceiptNext/releases/download/v1.0.0/receiptnext-linux-amd64 -chmod +x receiptnext -./receiptnext +curl -L -o app https://git.lohmar.co.uk/cclohmar/ReceiptNext/releases/download/v1.0.0/app-linux-amd64 +chmod +x app +./app # Linux arm64 (Raspberry Pi, etc.) -curl -L -o receiptnext https://git.lohmar.co.uk/cclohmar/ReceiptNext/releases/download/v1.0.0/receiptnext-linux-arm64 -chmod +x receiptnext -./receiptnext +curl -L -o app https://git.lohmar.co.uk/cclohmar/ReceiptNext/releases/download/v1.0.0/app-linux-arm64 +chmod +x app +./app ``` No dependencies, no CGO, no libc. Drop it on any Linux box and run. @@ -83,12 +83,12 @@ git clone https://git.lohmar.co.uk/cclohmar/ReceiptNext.git cd ReceiptNext # Build for your current platform -CGO_ENABLED=0 go build -o receiptnext . +CGO_ENABLED=0 go build -o app . # Cross-compile for any platform (no extra tools needed!) -CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o receiptnext-linux-arm64 . -CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o receiptnext-darwin-amd64 . -CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o receiptnext-darwin-arm64 . +CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o app-linux-arm64 . +CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o app-darwin-amd64 . +CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o app-darwin-arm64 . ``` The binary is fully static — zero runtime dependencies. @@ -128,7 +128,7 @@ Configuration is via environment variables in `.env`. The install script builds systemctl start receiptnext # Or run directly: -./receiptnext +./app ``` ### 2. Open in Browser diff --git a/build-all.sh b/build-all.sh index baeefcb..687bb34 100755 --- a/build-all.sh +++ b/build-all.sh @@ -9,7 +9,7 @@ # darwin/arm64: aarch64-apple-darwin-clang (via osxcross) # # Usage: ./build-all.sh -# Output: ./dist/expenseflow-{platform} +# Output: ./dist/app-{platform} set -euo pipefail @@ -23,7 +23,7 @@ echo "==> Building ExpenseFlow $VERSION" build() { local GOOS="$1" GOARCH="$2" CC="$3" SUFFIX="$4" - local OUT="$OUTDIR/expenseflow-$SUFFIX" + local OUT="$OUTDIR/app-$SUFFIX" echo " $SUFFIX ..." GOOS="$GOOS" GOARCH="$GOARCH" CGO_ENABLED=1 CC="$CC" \ go build -ldflags="$LDFLAGS" -o "$OUT" . diff --git a/contrib/receiptnext.service b/contrib/receiptnext.service index 608c22e..63312c6 100644 --- a/contrib/receiptnext.service +++ b/contrib/receiptnext.service @@ -8,10 +8,10 @@ Type=simple User=receiptnext Group=receiptnext WorkingDirectory=/opt/receiptnext -ExecStart=/usr/local/bin/receiptnext +ExecStart=/opt/receiptnext/app Restart=always RestartSec=5 -EnvironmentFile=-/etc/receiptnext/.env +EnvironmentFile=/opt/receiptnext/.env StandardOutput=append:/var/log/receiptnext.log StandardError=append:/var/log/receiptnext.log diff --git a/install.sh b/install.sh index 62a6f45..6ef3b69 100755 --- a/install.sh +++ b/install.sh @@ -70,13 +70,13 @@ if [ "${1:-}" = "-update" ]; then info "Rebuilding binary..." if command -v go &>/dev/null; then - CGO_ENABLED=0 go build -ldflags="-s -w" -o receiptnext . + CGO_ENABLED=0 go build -ldflags="-s -w" -o app . else warn "Go not found — downloading pre-built binary..." TAG=$(curl -fsSL https://git.lohmar.co.uk/api/v1/repos/cclohmar/ReceiptNext/releases/latest \ | python3 -c "import json,sys; print(json.load(sys.stdin).get('tag_name','v1.0.0'))" 2>/dev/null || echo "v1.0.0") ARCH="$(uname -m)"; [ "$ARCH" = "x86_64" ] && ARCH="amd64"; [ "$ARCH" = "aarch64" ] && ARCH="arm64" - sudo_if curl -fsSL -o receiptnext "https://git.lohmar.co.uk/cclohmar/ReceiptNext/releases/download/${TAG}/receiptnext-linux-${ARCH}" + sudo_if curl -fsSL -o app .https://git.lohmar.co.uk/cclohmar/ReceiptNext/releases/download/${TAG}/app-linux-${ARCH}" sudo_if chmod +x receiptnext fi @@ -122,16 +122,16 @@ esac if command -v go &>/dev/null; then info "Building binary from source (pure Go, no CGO)..." - CGO_ENABLED=0 go build -ldflags="-s -w" -o receiptnext . + CGO_ENABLED=0 go build -ldflags="-s -w" -o app . else info "Go not found — downloading pre-built binary..." TAG=$(curl -fsSL https://git.lohmar.co.uk/api/v1/repos/cclohmar/ReceiptNext/releases/latest \ | python3 -c "import json,sys; print(json.load(sys.stdin).get('tag_name','v1.0.0'))" 2>/dev/null || echo "v1.0.0") - URL="https://git.lohmar.co.uk/cclohmar/ReceiptNext/releases/download/${TAG}/receiptnext-linux-${ARCH}" - sudo_if curl -fsSL -o receiptnext "$URL" + URL="https://git.lohmar.co.uk/cclohmar/ReceiptNext/releases/download/${TAG}/app-linux-${ARCH}" + sudo_if curl -fsSL -o app .$URL" sudo_if chmod +x receiptnext fi -info "Binary ready: $INSTALL_DIR/receiptnext" +info "Binary ready: $INSTALL_DIR/app # ── 3. Create runtime directories ──────────────────────────────── sudo_if mkdir -p storage @@ -323,7 +323,7 @@ Type=simple User=${APP_USER} Group=${APP_USER} WorkingDirectory=${INSTALL_DIR} -ExecStart=${INSTALL_DIR}/receiptnext +ExecStart=${INSTALL_DIR}/app Restart=always RestartSec=5 EnvironmentFile=${INSTALL_DIR}/.env