mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-09-15 21:00:27 +00:00
build: add desktop release targets and trim go version suffix
This commit is contained in:
@@ -141,6 +141,22 @@ release_android: lib_android update_android_version build_android upload_android
|
|||||||
publish_android:
|
publish_android:
|
||||||
cd ../sing-box-for-android && ./gradlew :app:publishPlayReleaseBundle && ./gradlew --stop
|
cd ../sing-box-for-android && ./gradlew :app:publishPlayReleaseBundle && ./gradlew --stop
|
||||||
|
|
||||||
|
build_desktop_windows:
|
||||||
|
cd ../sing-box-for-desktop && pnpm install --frozen-lockfile && pnpm run package:win
|
||||||
|
|
||||||
|
build_desktop_linux:
|
||||||
|
cd ../sing-box-for-desktop && pnpm install --frozen-lockfile && pnpm run package:linux
|
||||||
|
|
||||||
|
upload_desktop:
|
||||||
|
mkdir -p dist/release_desktop
|
||||||
|
cp ../sing-box-for-desktop/release/SFW-*.exe dist/release_desktop 2>/dev/null || true
|
||||||
|
cp ../sing-box-for-desktop/release/SFL-*.deb ../sing-box-for-desktop/release/SFL-*.rpm ../sing-box-for-desktop/release/SFL-*.pkg.tar.zst dist/release_desktop 2>/dev/null || true
|
||||||
|
ghr --replace --draft --prerelease -p 5 "v${VERSION}" dist/release_desktop
|
||||||
|
./codeberg-release.sh --replace --draft --prerelease -p 5 "v${VERSION}" dist/release_desktop
|
||||||
|
rm -rf dist/release_desktop
|
||||||
|
|
||||||
|
release_desktop: update_desktop_version build_desktop_windows build_desktop_linux upload_desktop
|
||||||
|
|
||||||
# TODO: find why and remove `-destination 'generic/platform=iOS'`
|
# TODO: find why and remove `-destination 'generic/platform=iOS'`
|
||||||
# TODO: remove xcode clean when fix control widget fixed
|
# TODO: remove xcode clean when fix control widget fixed
|
||||||
build_ios:
|
build_ios:
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import (
|
|||||||
"flag"
|
"flag"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"regexp"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"github.com/sagernet/sing-box/cmd/internal/build_shared"
|
"github.com/sagernet/sing-box/cmd/internal/build_shared"
|
||||||
@@ -41,6 +42,9 @@ func main() {
|
|||||||
common.Must(json.NewDecoder(versionFile).Decode(&metadata))
|
common.Must(json.NewDecoder(versionFile).Decode(&metadata))
|
||||||
common.Must(versionFile.Close())
|
common.Must(versionFile.Close())
|
||||||
newGoVersion := runtime.Version()
|
newGoVersion := runtime.Version()
|
||||||
|
if match := regexp.MustCompile(`^go\d+\.\d+(?:\.\d+)?`).FindString(newGoVersion); match != "" {
|
||||||
|
newGoVersion = match
|
||||||
|
}
|
||||||
versionUpdated := metadata.Version != newVersion
|
versionUpdated := metadata.Version != newVersion
|
||||||
goVersionUpdated := metadata.GoVersion != newGoVersion
|
goVersionUpdated := metadata.GoVersion != newGoVersion
|
||||||
if !(versionUpdated || goVersionUpdated) {
|
if !(versionUpdated || goVersionUpdated) {
|
||||||
|
|||||||
Reference in New Issue
Block a user