mirror of
https://github.com/nexu-io/open-design.git
synced 2026-09-20 06:15:06 +08:00
0bf1b6d6b8
* fix(tools-pack): use junctions for Windows standalone peer deps * fix(desktop): expose IPC during startup * fix(tools-pack): preserve Windows inspect diagnostics * fix(tools-pack): report Windows inspect status errors * fix(packaged): use Electron net fetch for app protocol * fix(packaged): load Windows renderer from web sidecar * fix(desktop): show Windows packaged window during startup * fix(packaged): disable Windows GPU startup * fix(tools-pack): keep Windows core smoke observable * fix(packaged): remove Windows startup probes * fix(tools-pack): trace Windows desktop IPC status * fix(tools-pack): add Windows IPC diagnose loop * fix(release): default beta-s Windows updater feed * chore: clean merged test eof * refactor(release): unify prerelease channel model * chore(release): close prerelease doc escape hatches * refactor(release): converge release channel workflows * fix(release): install toolchain in metadata jobs * fix(release): build release package before contracts * chore(release): bump development version to 0.10.1 * fix(e2e): seed windows packaged smoke runtime config * fix(release): install toolchain for metadata publish * fix(release): materialize betas metadata checkout * chore(release): bump development version to 0.10.2 * fix(release): allow betas metadata cold start from s3 * fix(e2e): support betas packaged update scenarios * fix(release): pass betas channel into packaged smoke * fix(release): set betas channel during self-hosted builds * fix(release): verify counted channel reservations * fix(release): use pnpm cmd for betas windows publish * fix(release): add betas manifest artifact fallback * fix(release): skip beta-s public metadata fetch * fix(release): read beta-s manifests from storage * fix(release): cache beta windows tools-pack builds * fix(release): inline beta mac tools-pack builds * fix(pack): deep sign unsigned mac bundles * docs(pack): document payload-first beta updater validation * fix(release): align preview tools-pack cache flow * fix(release): align prerelease tools-pack cache flow * fix(release): pass github token to prerelease metadata * fix(release): setup pnpm before feishu notify * fix(release): add stable dry-run prepublish flow * fix(release): accept completed prerelease metadata gate * fix(release): require stable release branches * fix(release): converge r2 access checks * fix(updater): use release channel parser for defaults * fix(updater): harden windows payload relaunch * fix(release): converge updater smoke fixture contract * test(e2e): require silent updater fixture output * fix(release): align stable windows smoke build path * fix(ci): include release workspace in validation * fix(ci): repair release validation lanes Generated-By: looper 0.9.10+codex.autoclean (runner=fixer, agent=codex) * fix(ci): restore zero-install Feishu notification Generated-By: looper 0.9.10+codex.autoclean (runner=fixer, agent=codex) --------- Co-authored-by: Looper <looper@noreply.github.com>
112 lines
3.7 KiB
Bash
112 lines
3.7 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
required() {
|
|
local name="$1"
|
|
if [ -z "${!name:-}" ]; then
|
|
echo "$name is required" >&2
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
sha256_file() {
|
|
local path="$1"
|
|
local name
|
|
name="$(basename "$path")"
|
|
(
|
|
cd "$(dirname "$path")"
|
|
shasum -a 256 "$name" > "$name.sha256"
|
|
)
|
|
}
|
|
|
|
required RELEASE_ASSETS_DIR
|
|
required RELEASE_CHANNEL
|
|
required RELEASE_NAMESPACE
|
|
required RELEASE_PUBLIC_ORIGIN
|
|
required RELEASE_TARGET
|
|
required RELEASE_VERSION
|
|
required TOOLS_PACK_DIR
|
|
|
|
RELEASE_ASSET_SUFFIX="${RELEASE_ASSET_SUFFIX:-}"
|
|
|
|
mkdir -p "$RELEASE_ASSETS_DIR"
|
|
|
|
case "$RELEASE_TARGET" in
|
|
mac_arm64 | mac_x64)
|
|
artifact_mode="${RELEASE_ARTIFACT_MODE:-dmg-and-zip}"
|
|
case "$artifact_mode" in
|
|
dmg-only | dmg-and-zip | dmg-and-payload | all) ;;
|
|
*)
|
|
echo "unsupported RELEASE_ARTIFACT_MODE for $RELEASE_TARGET: $artifact_mode" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
arch="${RELEASE_TARGET#mac_}"
|
|
source_dmg="$TOOLS_PACK_DIR/out/mac/namespaces/$RELEASE_NAMESPACE/dmg/Open Design-$RELEASE_NAMESPACE.dmg"
|
|
source_zip="$TOOLS_PACK_DIR/out/mac/namespaces/$RELEASE_NAMESPACE/zip/Open Design-$RELEASE_NAMESPACE.zip"
|
|
source_payload="$TOOLS_PACK_DIR/out/mac/namespaces/$RELEASE_NAMESPACE/payload/Open Design-$RELEASE_NAMESPACE-payload.zip"
|
|
versioned_dmg="open-design-$RELEASE_VERSION$RELEASE_ASSET_SUFFIX-mac-$arch.dmg"
|
|
versioned_zip="open-design-$RELEASE_VERSION$RELEASE_ASSET_SUFFIX-mac-$arch.zip"
|
|
versioned_payload="open-design-$RELEASE_VERSION$RELEASE_ASSET_SUFFIX-mac-$arch-payload.zip"
|
|
|
|
if [ ! -f "$source_dmg" ]; then
|
|
echo "expected dmg not found at $source_dmg" >&2
|
|
exit 1
|
|
fi
|
|
cp "$source_dmg" "$RELEASE_ASSETS_DIR/$versioned_dmg"
|
|
sha256_file "$RELEASE_ASSETS_DIR/$versioned_dmg"
|
|
|
|
if [ "$artifact_mode" = "dmg-and-payload" ] || [ "$artifact_mode" = "all" ]; then
|
|
if [ ! -f "$source_payload" ]; then
|
|
echo "expected payload not found at $source_payload" >&2
|
|
exit 1
|
|
fi
|
|
cp "$source_payload" "$RELEASE_ASSETS_DIR/$versioned_payload"
|
|
sha256_file "$RELEASE_ASSETS_DIR/$versioned_payload"
|
|
fi
|
|
|
|
if [ "$artifact_mode" = "dmg-only" ] || [ "$artifact_mode" = "dmg-and-payload" ]; then
|
|
exit 0
|
|
fi
|
|
if [ ! -f "$source_zip" ]; then
|
|
echo "expected zip not found at $source_zip" >&2
|
|
exit 1
|
|
fi
|
|
cp "$source_zip" "$RELEASE_ASSETS_DIR/$versioned_zip"
|
|
sha256_file "$RELEASE_ASSETS_DIR/$versioned_zip"
|
|
|
|
zip_sha512="$(openssl dgst -sha512 -binary "$RELEASE_ASSETS_DIR/$versioned_zip" | openssl base64 -A)"
|
|
zip_size="$(stat -f%z "$RELEASE_ASSETS_DIR/$versioned_zip")"
|
|
version_prefix="${RELEASE_VERSION_PREFIX:-$RELEASE_CHANNEL/versions/$RELEASE_VERSION$RELEASE_ASSET_SUFFIX}"
|
|
zip_url="${RELEASE_PUBLIC_ORIGIN%/}/$version_prefix/$versioned_zip"
|
|
release_date="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
release_notes="${RELEASE_NOTES:-Open Design $RELEASE_VERSION$RELEASE_ASSET_SUFFIX}"
|
|
cat > "$RELEASE_ASSETS_DIR/latest-mac.yml" <<EOF
|
|
version: "$RELEASE_VERSION"
|
|
files:
|
|
- url: "$zip_url"
|
|
sha512: "$zip_sha512"
|
|
size: $zip_size
|
|
path: "$zip_url"
|
|
sha512: "$zip_sha512"
|
|
releaseDate: "$release_date"
|
|
releaseNotes: "$release_notes"
|
|
EOF
|
|
;;
|
|
linux_x64)
|
|
source_appimage="$TOOLS_PACK_DIR/out/linux/namespaces/$RELEASE_NAMESPACE/builder/Open Design-$RELEASE_NAMESPACE.AppImage"
|
|
versioned_appimage="open-design-$RELEASE_VERSION$RELEASE_ASSET_SUFFIX-linux-x64.AppImage"
|
|
if [ ! -f "$source_appimage" ]; then
|
|
echo "expected AppImage not found at $source_appimage" >&2
|
|
exit 1
|
|
fi
|
|
cp "$source_appimage" "$RELEASE_ASSETS_DIR/$versioned_appimage"
|
|
sha256_file "$RELEASE_ASSETS_DIR/$versioned_appimage"
|
|
;;
|
|
*)
|
|
echo "unsupported RELEASE_TARGET for POSIX assets: $RELEASE_TARGET" >&2
|
|
exit 1
|
|
;;
|
|
esac
|