Add versioned Docker builder tags and Settings about block
Tag Docker builder images with the current application version in both Linux Docker build scripts so different release environments do not overwrite each other with one floating builder tag. Replace the Settings Scheduler note with an About block that shows the GoSentry version, Go runtime version, Fyne module version, and the project repository link.
This commit is contained in:
@@ -6,6 +6,7 @@ set -euo pipefail
|
||||
# default includes the application version and target platform.
|
||||
version="$(sed -n 's/^var Version = "\(.*\)"/\1/p' src/core/version.go)"
|
||||
version="${version:-0.0.0-dev}"
|
||||
tag="gitea.mixdep.ru/mix/pysentry-builder:${version}"
|
||||
output="${1:-dist/linux/pysentry-${version}-linux-amd64}"
|
||||
docker_user_args=()
|
||||
if command -v id >/dev/null 2>&1; then
|
||||
@@ -14,7 +15,7 @@ fi
|
||||
|
||||
# Dockerfile contains the native packages required by Fyne. Keeping that
|
||||
# environment in Docker makes Linux builds repeatable from Windows hosts and CI.
|
||||
docker build -f Dockerfile -t gitea.mixdep.ru/mix/pysentry-builder .
|
||||
docker build -f Dockerfile -t "$tag" .
|
||||
|
||||
mkdir -p "$(dirname "$output")"
|
||||
docker run --rm \
|
||||
@@ -24,7 +25,7 @@ docker run --rm \
|
||||
-e "GOCACHE=/tmp/go-build-cache" \
|
||||
-v "$(pwd):/src" \
|
||||
-w /src \
|
||||
gitea.mixdep.ru/mix/pysentry-builder \
|
||||
"$tag" \
|
||||
bash -c 'CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -buildvcs=false -trimpath -ldflags "-s -w -X github.com/pysentry/pysentry/src/core.Version=${VERSION}" -o "${OUTPUT}" ./cmd/pysentry'
|
||||
|
||||
# Icons are embedded in the Go binary, so there is no assets directory to copy
|
||||
|
||||
@@ -5,15 +5,13 @@ set -euo pipefail
|
||||
# image contains Linux/Fyne dependencies for amd64 and arm64, plus the MinGW
|
||||
# cross-compiler used for the Windows GUI executable. Actual build commands live
|
||||
# here rather than in Dockerfile so target selection does not require rebuilding
|
||||
# the image.
|
||||
tag="gitea.mixdep.ru/mix/pysentry-builder"
|
||||
|
||||
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
repo_root="$(cd "${script_dir}/.." && pwd)"
|
||||
cd "$repo_root"
|
||||
|
||||
version="$(sed -n 's/^var Version = "\(.*\)"/\1/p' src/core/version.go)"
|
||||
version="${version:-0.0.0-dev}"
|
||||
tag="gitea.mixdep.ru/mix/pysentry-builder:${version}"
|
||||
|
||||
docker_user_args=()
|
||||
if command -v id >/dev/null 2>&1; then
|
||||
|
||||
Reference in New Issue
Block a user