2024-07-21 16:29:16 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
refactor: reorganize into internal packages, fix critical panics and error handling
Move browser, config, player, and radio logic into internal/{config,radio,player,ui,version}.
Add cached API host resolution, context-aware HTTP client, and nil/length guards to eliminate
RandomIP, nslookup, reverseLookup, and GetStations panics. Replace subExecute with clean
legacyPlayer using Run-only execution. Fix inverted -short test guards, unformatted config
error messages, and "Erorr" typo. Remove obsolete vendor/GOPATH logic from build scripts.
Update callers in stations.go and radiomenu.go to new paths; retain shims for transition.
2026-06-05 20:10:54 +00:00
|
|
|
mkdir -p build
|
2024-07-21 16:29:16 +00:00
|
|
|
|
|
|
|
|
GIT_COMMIT=$(git rev-list -1 HEAD)
|
|
|
|
|
export GIT_COMMIT
|
|
|
|
|
CANONICAL_VERSION=$(cat ./VERSION)-$(uname)
|
|
|
|
|
export CANONICAL_VERSION
|
|
|
|
|
VERSION_STRING="$CANONICAL_VERSION-$GIT_COMMIT"
|
|
|
|
|
export VERSION_STRING
|
|
|
|
|
|
|
|
|
|
buildpath="build/$(uname)/gostations"
|
|
|
|
|
|
2024-07-21 16:35:28 +00:00
|
|
|
/usr/local/go/bin/go mod tidy
|
2024-07-21 16:29:16 +00:00
|
|
|
|
2024-07-21 16:35:28 +00:00
|
|
|
/usr/local/go/bin/go build -o "$buildpath" -ldflags "-X main.version=$VERSION_STRING"
|
2024-07-21 16:29:16 +00:00
|
|
|
|
|
|
|
|
"$buildpath" -v
|
|
|
|
|
|