Add autostart status and release builds

This commit is contained in:
mixeme
2026-06-15 07:35:52 +03:00
parent 47e2ba7272
commit 5727e13f23
18 changed files with 443 additions and 72 deletions
+16 -8
View File
@@ -2,19 +2,27 @@
set -euo pipefail
# Optional first argument mirrors build-linux.sh. The Docker build still writes
# the final artifact into the local dist/ tree, not into the container.
output="${1:-dist/linux/pysentry}"
# the final artifact into the local dist/ tree, not into the container. The
# 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}"
output="${1:-dist/linux/pysentry-${version}-linux-amd64}"
# 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 pysentry-linux-builder .
docker build -f Dockerfile -t gitea.mixdep.ru/mix/pysentry-builder .
# The image build produces /out/linux and /out/windows. This helper copies only
# the Linux binary for compatibility with the older Linux-only workflow; use
# build-release-linux.sh when both platform artifacts are needed.
container_id="$(docker create gitea.mixdep.ru/mix/pysentry-builder)"
cleanup() {
docker rm "$container_id" >/dev/null
}
trap cleanup EXIT
# The image build produces /out/pysentry. A temporary container is used only as a
# convenient way to copy that file out; the app is not run inside the container.
container_id="$(docker create pysentry-linux-builder)"
mkdir -p "$(dirname "$output")"
docker cp "${container_id}:/out/pysentry" "$output"
docker rm "$container_id" >/dev/null
docker cp "${container_id}:/out/linux/pysentry-${version}-linux-amd64" "$output"
# Icons are embedded in the Go binary, so there is no assets directory to copy
# after extracting the Linux executable.