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:
mixeme
2026-06-16 07:36:00 +03:00
parent 4a8feb351e
commit 088f6e77b0
4 changed files with 43 additions and 10 deletions
+3 -3
View File
@@ -107,9 +107,9 @@ dist/linux/pysentry-0.2.3-linux-amd64
Linux using Docker: Linux using Docker:
```bash ```bash
# Builds the Linux binary inside Docker using the image tag # Builds the Linux binary inside Docker using the versioned image tag
# gitea.mixdep.ru/mix/pysentry-builder. Useful from hosts or CI jobs where the # gitea.mixdep.ru/mix/pysentry-builder:<version>. Useful from hosts or CI jobs
# native Linux/Fyne packages are not installed locally. # where the native Linux/Fyne packages are not installed locally.
chmod +x ./scripts/build-linux-docker.sh chmod +x ./scripts/build-linux-docker.sh
./scripts/build-linux-docker.sh ./scripts/build-linux-docker.sh
``` ```
+3 -2
View File
@@ -6,6 +6,7 @@ set -euo pipefail
# default includes the application version and target platform. # default includes the application version and target platform.
version="$(sed -n 's/^var Version = "\(.*\)"/\1/p' src/core/version.go)" version="$(sed -n 's/^var Version = "\(.*\)"/\1/p' src/core/version.go)"
version="${version:-0.0.0-dev}" version="${version:-0.0.0-dev}"
tag="gitea.mixdep.ru/mix/pysentry-builder:${version}"
output="${1:-dist/linux/pysentry-${version}-linux-amd64}" output="${1:-dist/linux/pysentry-${version}-linux-amd64}"
docker_user_args=() docker_user_args=()
if command -v id >/dev/null 2>&1; then if command -v id >/dev/null 2>&1; then
@@ -14,7 +15,7 @@ fi
# Dockerfile contains the native packages required by Fyne. Keeping that # Dockerfile contains the native packages required by Fyne. Keeping that
# environment in Docker makes Linux builds repeatable from Windows hosts and CI. # 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")" mkdir -p "$(dirname "$output")"
docker run --rm \ docker run --rm \
@@ -24,7 +25,7 @@ docker run --rm \
-e "GOCACHE=/tmp/go-build-cache" \ -e "GOCACHE=/tmp/go-build-cache" \
-v "$(pwd):/src" \ -v "$(pwd):/src" \
-w /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' 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 # Icons are embedded in the Go binary, so there is no assets directory to copy
+1 -3
View File
@@ -5,15 +5,13 @@ set -euo pipefail
# image contains Linux/Fyne dependencies for amd64 and arm64, plus the MinGW # image contains Linux/Fyne dependencies for amd64 and arm64, plus the MinGW
# cross-compiler used for the Windows GUI executable. Actual build commands live # cross-compiler used for the Windows GUI executable. Actual build commands live
# here rather than in Dockerfile so target selection does not require rebuilding # 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)" script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
repo_root="$(cd "${script_dir}/.." && pwd)" repo_root="$(cd "${script_dir}/.." && pwd)"
cd "$repo_root" cd "$repo_root"
version="$(sed -n 's/^var Version = "\(.*\)"/\1/p' src/core/version.go)" version="$(sed -n 's/^var Version = "\(.*\)"/\1/p' src/core/version.go)"
version="${version:-0.0.0-dev}" version="${version:-0.0.0-dev}"
tag="gitea.mixdep.ru/mix/pysentry-builder:${version}"
docker_user_args=() docker_user_args=()
if command -v id >/dev/null 2>&1; then if command -v id >/dev/null 2>&1; then
+36 -2
View File
@@ -2,6 +2,9 @@ package gui
import ( import (
"fmt" "fmt"
"net/url"
"runtime"
"runtime/debug"
"sort" "sort"
"strconv" "strconv"
"strings" "strings"
@@ -24,6 +27,7 @@ const appID = "io.github.pysentry.desktop"
const allFolders = "All" const allFolders = "All"
const noFolder = "No folder" const noFolder = "No folder"
const minJobsSidebarWidth float32 = 480 const minJobsSidebarWidth float32 = 480
const projectRepositoryURL = "https://gitea.mixdep.ru/mix/gosentry"
// The GUI package aliases core types to keep widget callbacks short. The actual // The GUI package aliases core types to keep widget callbacks short. The actual
// durable model still lives in src/core, so GUI code does not define a second // durable model still lives in src/core, so GUI code does not define a second
@@ -836,11 +840,41 @@ func settingsView(w fyne.Window, store *core.Store, jobs *[]job) fyne.CanvasObje
saveSettings, saveSettings,
settingsStatus, settingsStatus,
widget.NewSeparator(), widget.NewSeparator(),
widget.NewLabelWithStyle("Scheduler", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}), widget.NewLabelWithStyle("About", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}),
widget.NewLabel("Current core supports @every schedules and standard 5-field cron expressions."), detailRow("GoSentry", widget.NewLabel(core.Version)),
detailRow("Go", widget.NewLabel(runtime.Version())),
detailRow("Fyne", widget.NewLabel(fyneVersion())),
detailRow("Repository", widget.NewHyperlink(projectRepositoryURL, mustParseURL(projectRepositoryURL))),
)) ))
} }
func fyneVersion() string {
info, ok := debug.ReadBuildInfo()
if !ok {
return "unknown"
}
for _, dependency := range info.Deps {
if dependency.Path == "fyne.io/fyne/v2" {
if dependency.Replace != nil && dependency.Replace.Version != "" {
return dependency.Replace.Version
}
if dependency.Version != "" {
return dependency.Version
}
return "local"
}
}
return "unknown"
}
func mustParseURL(raw string) *url.URL {
parsed, err := url.Parse(raw)
if err != nil {
return &url.URL{}
}
return parsed
}
func chooseFolder(w fyne.Window, target *widget.Entry) { func chooseFolder(w fyne.Window, target *widget.Entry) {
folderDialog := dialog.NewFolderOpen(func(uri fyne.ListableURI, err error) { folderDialog := dialog.NewFolderOpen(func(uri fyne.ListableURI, err error) {
if err != nil || uri == nil { if err != nil || uri == nil {