84 lines
2.5 KiB
Markdown
84 lines
2.5 KiB
Markdown
# Internal Extension Distribution
|
|
|
|
## Fixed Extension ID
|
|
|
|
- Manifest key is fixed in the project.
|
|
- The unpacked extension ID is `pkjopdibdnomhogjheclhnknmejccffg`.
|
|
- Update Logto with:
|
|
- `https://pkjopdibdnomhogjheclhnknmejccffg.chromiumapp.org/callback`
|
|
- `https://pkjopdibdnomhogjheclhnknmejccffg.chromiumapp.org/`
|
|
- `chrome-extension://pkjopdibdnomhogjheclhnknmejccffg`
|
|
|
|
## Internal Package
|
|
|
|
1. Run `npm test`.
|
|
2. Run `npm run package:internal`.
|
|
3. Run `npm run write:latest`.
|
|
4. Send `release/star-chart-search-enhancer-internal.zip` to coworkers.
|
|
|
|
## COS Update Manifest
|
|
|
|
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:
|
|
- `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` 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://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
|
|
```
|
|
|
|
## Drone Release Flow
|
|
|
|
Tag the repo to trigger the release pipeline:
|
|
|
|
```bash
|
|
git tag 0.0525.1
|
|
git push origin 0.0525.1
|
|
```
|
|
|
|
The Drone job will:
|
|
|
|
1. Run `npm ci`.
|
|
2. Run `npm test`.
|
|
3. Run `npm run release:tag`.
|
|
4. Build the release bundle.
|
|
5. Write `release/latest.json`.
|
|
6. Upload `latest.json`, the ZIP, and the PDF to COS.
|
|
|
|
Drone secrets required:
|
|
|
|
- `cos_secret_id`
|
|
- `cos_secret_key`
|
|
|
|
The pipeline uses the tag as the release version. Recommended format: `0.MMDD.N`.
|
|
|
|
## Coworker Install Steps
|
|
|
|
1. Unzip `star-chart-search-enhancer-internal.zip`.
|
|
2. Open `chrome://extensions`.
|
|
3. Enable developer mode.
|
|
4. Click `Load unpacked`.
|
|
5. Select the unzipped folder.
|
|
6. Confirm the extension ID is `pkjopdibdnomhogjheclhnknmejccffg`.
|
|
|
|
## Notes
|
|
|
|
- Keep `.local/extension-key.pem` private and backed up internally.
|
|
- Do not commit or share the private key with people who only need to install the extension.
|
|
- If the batch submit backend changes away from `192.168.31.21:8083`, update `scripts/manifest.mjs` before packaging.
|