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
This commit is contained in:
parent
f9a7df1580
commit
e20a484ebc
5 changed files with 23 additions and 23 deletions
2
Makefile
2
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
|
||||
|
|
|
|||
22
README.md
22
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
|
||||
|
|
|
|||
|
|
@ -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" .
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
14
install.sh
14
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue