fix(release): 发版时保留本机已安装应用
This commit is contained in:
1 parent
a491c5adeb
commit
385223fd21
4 files changed
+16
-9
No files matched your search
@@ -30,12 +30,13 @@ Before acting, read the repository `AGENTS.md`, the release section of `DEVELOPM
|
||||
- Publish the same appcast to the global and China release APIs. The manifest must remain last: packages first, then GitHub Release, then update APIs.
|
||||
- The Homebrew target is `ysicing/homebrew-tap`, installed as `ysicing/tap/xstats`.
|
||||
- `dist/release-provenance.json` binds artifacts to the build-time commit, version, build number, and version-file hashes. Do not bypass it or rebuild provenance manually.
|
||||
- A release builds and verifies artifacts without quitting, replacing, or launching the XStats installed on the current machine. Do not run `install_local.sh` as part of `task release` or `task release-all`; local installation is a separate, explicit request.
|
||||
|
||||
## Execution shape
|
||||
|
||||
1. Establish a clean, current source baseline and pass repository tests/CI.
|
||||
2. Prepare only release metadata, then let `task release` advance `project.yml`, build, sign, notarize, staple, and generate `dist/`.
|
||||
3. Verify the installed app and generated artifacts before committing release metadata.
|
||||
3. Verify the built app in `build/DerivedData-arm64/Build/Products/Release/XStats.app` and generated artifacts before committing release metadata; leave `/Applications/XStats.app` untouched.
|
||||
4. Commit and push only the allowed metadata, then run the provenance verifier.
|
||||
5. Run the idempotent publish script and verify every external destination independently.
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ task release
|
||||
```
|
||||
|
||||
`task release` defaults to the `XStats` notary profile. Capture both Apple submission IDs and require `Accepted` for the app and DMG.
|
||||
It builds and packages without installing or launching the release on the current machine.
|
||||
|
||||
When the user explicitly authorizes commit, push, and all external publication, the canonical automated path is instead:
|
||||
|
||||
@@ -75,14 +76,14 @@ dist/xstats.rb
|
||||
dist/release-provenance.json
|
||||
```
|
||||
|
||||
`install_local.sh` moves the finished app to `/Applications`, so verify architecture and signatures there rather than assuming the DerivedData app still exists:
|
||||
The finished app remains in DerivedData. Verify that artifact directly; do not replace or launch `/Applications/XStats.app` during a release:
|
||||
|
||||
```bash
|
||||
lipo -archs /Applications/XStats.app/Contents/MacOS/XStats
|
||||
lipo -archs /Applications/XStats.app/Contents/MacOS/XStatsHelper
|
||||
lipo -archs /Applications/XStats.app/Contents/PlugIns/XStatsWidget.appex/Contents/MacOS/XStatsWidget
|
||||
codesign --verify --deep --strict --verbose=2 /Applications/XStats.app
|
||||
spctl -a -vv /Applications/XStats.app
|
||||
lipo -archs build/DerivedData-arm64/Build/Products/Release/XStats.app/Contents/MacOS/XStats
|
||||
lipo -archs build/DerivedData-arm64/Build/Products/Release/XStats.app/Contents/MacOS/XStatsHelper
|
||||
lipo -archs build/DerivedData-arm64/Build/Products/Release/XStats.app/Contents/PlugIns/XStatsWidget.appex/Contents/MacOS/XStatsWidget
|
||||
codesign --verify --deep --strict --verbose=2 build/DerivedData-arm64/Build/Products/Release/XStats.app
|
||||
spctl -a -vv build/DerivedData-arm64/Build/Products/Release/XStats.app
|
||||
xcrun stapler validate dist/XStats-X.Y.Z-AppleSilicon.dmg
|
||||
spctl -a -t open --context context:primary-signature -vv dist/XStats-X.Y.Z-AppleSilicon.dmg
|
||||
```
|
||||
|
||||
@@ -103,6 +103,10 @@ xcrun notarytool store-credentials XStats \
|
||||
NOTARY_PROFILE=XStats task release
|
||||
```
|
||||
|
||||
`task release` 只构建并校验制品,`task release-all` 会继续对外发布;两者都不会退出、替换或启动当前机器
|
||||
`/Applications/XStats.app`。发布版 App 留在 `build/DerivedData-arm64/Build/Products/Release/XStats.app`
|
||||
供签名、公证和架构核验;只有明确需要本地试用时才单独执行安装。
|
||||
|
||||
如果使用其他 profile,可以覆盖 `NOTARY_PROFILE`。`SKIP_NOTARIZE=1 task release` 只适合本机测试,
|
||||
生成的包不应公开分发。
|
||||
|
||||
|
||||
+3
-2
@@ -139,13 +139,14 @@ cask "xstats" do
|
||||
end
|
||||
CASK
|
||||
|
||||
# 本机只保留一份:把发布版装到 /Applications
|
||||
./Scripts/install_local.sh "$APP"
|
||||
# 发版只生成并校验制品,不替换或启动当前机器上的 XStats。
|
||||
# 已公证的 App 留在 DerivedData,供发布前核验;本地安装需另行明确执行。
|
||||
|
||||
echo
|
||||
echo "✅ ${DIST}/${NAME}.dmg SHA-256 $(shasum -a 256 "$DIST/$NAME.dmg" | cut -d' ' -f1)"
|
||||
echo " 在线升级:${DIST}/*.zip · ${DIST}/appcast.json"
|
||||
echo " Homebrew cask:${DIST}/xstats.rb"
|
||||
echo " 本机已安装的 XStats 保持不变"
|
||||
if [ "${SKIP_NOTARIZE:-0}" = "1" ]; then
|
||||
echo "⚠️ 未公证,仅供本机测试。"
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user