feat: switch extension updates to COS

This commit is contained in:
2026-05-25 10:32:39 +08:00
parent 8fa9fc4469
commit 57e4dc72aa
10 changed files with 205 additions and 21 deletions
+11 -5
View File
@@ -23,17 +23,23 @@ The popup checks `src/shared/update-config.ts` for the update manifest URL.
Before publishing the COS-based update flow:
1. Upload these files to COS:
- `release/latest.json`
- `release/star-chart-search-enhancer-internal.zip`
- `release/星图增强插件-超简单安装使用指南.pdf`
- `star-chart-search-enhancer/latest.json`
- `star-chart-search-enhancer/releases/<version>/star-chart-search-enhancer-internal.zip`
- `star-chart-search-enhancer/releases/<version>/星图增强插件-超简单安装使用指南.pdf`
2. Make the COS path publicly readable.
3. Replace the placeholder `UPDATE_MANIFEST_URL` in `src/shared/update-config.ts`.
3. Replace the placeholder `UPDATE_MANIFEST_URL` in `src/shared/update-config.ts` if your COS bucket changes.
4. Rebuild and package the extension.
The release manifest can be generated with a real public base URL:
```bash
UPDATE_PUBLIC_BASE_URL="https://<your-cos-domain>/star-chart-search-enhancer/releases/<version>" npm run write:latest
UPDATE_PUBLIC_BASE_URL="https://wksgx-1343191620.cos.ap-nanjing.myqcloud.com/star-chart-search-enhancer/releases/<version>" npm run write:latest
```
Quick access check:
```bash
curl -I https://wksgx-1343191620.cos.ap-nanjing.myqcloud.com/star-chart-search-enhancer/latest.json
```
## Coworker Install Steps