| 12345678910111213141516171819 |
- #!/usr/bin/env bash
- set -euo pipefail
- repo_root="$(cd "$(dirname "$0")/../.." && pwd)"
- publish_dir="$repo_root/dist/legacy-sync-bridge-win-x64"
- output="$repo_root/dist/xiaoshu-legacy-sync-bridge-iis.zip"
- stage="$(mktemp -d)"
- trap 'rm -rf "$stage"' EXIT
- test -f "$publish_dir/Xiaoshu.LegacySyncBridge.dll"
- cp -R "$publish_dir/." "$stage/"
- cp -R "$repo_root/legacy-sync-bridge/database" "$stage/database"
- rm -rf "$stage/deployment"
- cp -R "$repo_root/legacy-sync-bridge/deployment" "$stage/deployment"
- cp "$repo_root/legacy-sync-bridge/README.md" "$stage/README.md"
- rm -f "$stage/deployment/package.sh"
- rm -f "$output"
- (cd "$stage" && zip -qr "$output" .)
- printf '%s\n' "$output"
|