dev: automated commit - 2025-06-05 14:02:48
This commit is contained in:
parent
b754d49861
commit
33106ea4a6
1 changed files with 3 additions and 4 deletions
7
dev
7
dev
|
@ -1,8 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
# Simple dev tool launcher - builds if needed
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Change to script's directory
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
# Colors
|
||||
GREEN='\033[0;32m'
|
||||
RED='\033[0;31m'
|
||||
|
@ -30,12 +32,9 @@ if [[ ! -f "$BINARY" ]] || [[ "main.go" -nt "$BINARY" ]]; then
|
|||
error "Go not installed. Install with: sudo pacman -S go"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Building dev tool..."
|
||||
mkdir -p bin
|
||||
|
||||
go mod tidy
|
||||
|
||||
if go build -ldflags="-s -w" -o "$BINARY" main.go; then
|
||||
log "✅ Built: $BINARY"
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue