v3 fixes and styling

This commit is contained in:
Andy Dixon
2026-06-16 15:43:25 +01:00
parent 493bfed599
commit 58e916ecf8
32 changed files with 1847 additions and 267 deletions
+29 -1
View File
@@ -6,6 +6,34 @@ nexus_wails_version() {
awk '$1 == "github.com/wailsapp/wails/v2" { print $2; exit }' "$go_mod"
}
nexus_bool_enabled() {
case "${1:-}" in
1|true|TRUE|yes|YES|on|ON) return 0 ;;
*) return 1 ;;
esac
}
nexus_use_upx_for_target() {
local target_os="$1"
nexus_bool_enabled "${NEXUS_COMPRESS:-0}" || return 1
if [ "$target_os" = "darwin" ] && ! nexus_bool_enabled "${NEXUS_FORCE_MACOS_UPX:-0}"; then
return 1
fi
return 0
}
nexus_skips_upx_for_target() {
local target_os="$1"
nexus_bool_enabled "${NEXUS_COMPRESS:-0}" || return 1
[ "$target_os" = "darwin" ] || return 1
! nexus_bool_enabled "${NEXUS_FORCE_MACOS_UPX:-0}"
}
nexus_configure_release_cgo() {
export CGO_CFLAGS="${CGO_CFLAGS:--O2 -g0}"
export CGO_CXXFLAGS="${CGO_CXXFLAGS:--O2 -g0}"
}
nexus_build_tags() {
if command -v pkg-config >/dev/null 2>&1 \
&& pkg-config --exists webkit2gtk-4.1 \
@@ -24,7 +52,7 @@ nexus_build_version() {
nexus_build_ldflags() {
local version="$1"
local flags="-s -w -X github.com/andydixon/nexus/internal/api.appVersion=${version}"
local flags="-s -w -buildid= -X github.com/andydixon/nexus/internal/api.appVersion=${version}"
if [ -n "${NEXUS_UPDATE_URL:-}" ]; then
flags="${flags} -X github.com/andydixon/nexus/internal/api.appUpdateURL=${NEXUS_UPDATE_URL}"
fi