mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 06:26:14 -05:00
refactor: align GP profile and packaging flow
Main changes: - Refactor connect/auth flows around a single OS profile and host identity model, including gateway fallback and cookie-on-stdin handling. - Align request parameters, HIP host-id propagation, SAML webview user-agent behavior, and portal default-browser handling with observed official client behavior. - Add opt-in cookie cache support and Microsoft Defender HIP reporting while keeping host-id validation explicit. - Add BSD build, packaging, release artifact, and provenance support with FreeBSD/OpenBSD path and dependency cleanup. - Update NixOS install documentation and dependency compatibility fixes.
This commit is contained in:
92 files changed
+9847
-2868
No files matched your search
+33
-15
@@ -2,10 +2,11 @@
|
||||
|
||||
# Usage: ./scripts/gh-release.sh <tag>
|
||||
|
||||
set -e
|
||||
set -euo pipefail
|
||||
shopt -s nullglob
|
||||
|
||||
REPO="yuezk/GlobalProtect-openconnect"
|
||||
TAG=$1
|
||||
TAG=${1:-}
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
@@ -17,34 +18,51 @@ if [ -z "$TAG" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
upload_files() {
|
||||
local files=("$@")
|
||||
|
||||
if [ ${#files[@]} -eq 0 ]; then
|
||||
echo "No release assets found to upload"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
gh -R "$REPO" release upload "$TAG" "${files[@]}"
|
||||
}
|
||||
|
||||
release_assets() {
|
||||
"$SCRIPT_DIR/release-assets.sh" "$TAG"
|
||||
}
|
||||
|
||||
# For snapshot release, we don't create a release, just clear the existing assets and upload new ones.
|
||||
# This is to avoid notification spam.
|
||||
release_snapshot() {
|
||||
RELEASE_NOTES='**!!! DO NOT USE THIS RELEASE IN PRODUCTION !!!**'
|
||||
|
||||
# Get the existing assets
|
||||
gh -R "$REPO" release view "$TAG" --json assets --jq '.assets[].name' \
|
||||
| xargs -I {} gh -R "$REPO" release delete-asset "$TAG" {} --yes
|
||||
while IFS= read -r asset; do
|
||||
if [ -n "$asset" ]; then
|
||||
gh -R "$REPO" release delete-asset "$TAG" "$asset" --yes
|
||||
fi
|
||||
done < <(gh -R "$REPO" release view "$TAG" --json assets --jq '.assets[].name')
|
||||
|
||||
echo "Uploading new assets..."
|
||||
# Upload all artifacts for snapshot release because we don't need to guarantee stability.
|
||||
gh -R "$REPO" release upload "$TAG" \
|
||||
"$PROJECT_DIR"/.build/artifacts/artifact-*/*
|
||||
mapfile -t files < <(release_assets)
|
||||
upload_files "${files[@]}"
|
||||
}
|
||||
|
||||
release_tag() {
|
||||
echo "Removing existing release..."
|
||||
gh -R "$REPO" release delete $TAG --yes --cleanup-tag || true
|
||||
gh -R "$REPO" release delete "$TAG" --yes --cleanup-tag || true
|
||||
|
||||
echo "Creating release..."
|
||||
# Only upload the source tarball and GUI components for tagged release.
|
||||
# Other components will be built in `release.yml` from the standalone
|
||||
# source tarball and uploaded. This is to ensure the source tarball is stable.
|
||||
gh -R "$REPO" release create $TAG \
|
||||
# Upload source tarballs, GUI components, and BSD packages. Other Linux
|
||||
# packages are built in `release.yml` from the standalone source tarball.
|
||||
gh -R "$REPO" release create "$TAG" \
|
||||
--title "$TAG" \
|
||||
--notes "$RELEASE_NOTES" \
|
||||
"$PROJECT_DIR"/.build/artifacts/artifact-source*/* \
|
||||
"$PROJECT_DIR"/.build/artifacts/artifact-gpgui-*/*
|
||||
--notes "$RELEASE_NOTES"
|
||||
|
||||
mapfile -t files < <(release_assets)
|
||||
upload_files "${files[@]}"
|
||||
}
|
||||
|
||||
if [[ $TAG == *"snapshot" ]]; then
|
||||
|
||||
Reference in new issue
Block a user