@gmcb/cli 0.9.15 → 0.9.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/lib/actions/build.js +2 -2
- package/lib/apis/index.js +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- release:insert -->
|
|
4
4
|
|
|
5
|
+
## 0.9.17 [2026-11-20]
|
|
6
|
+
<!-- generated-by: specs -->
|
|
7
|
+
### 优化
|
|
8
|
+
- `--pull` 拉取 electron-vite 远程工程时,注入并执行的复制脚本由 `copy:h5` 更名为 `copy:electron`,与 gradlew 的 `copy:android` 命名对齐;远端工程自带的 `copy:h5` 脚本不再被覆盖。
|
|
9
|
+
|
|
10
|
+
## 0.9.16 [2026-11-19]
|
|
11
|
+
<!-- generated-by: specs -->
|
|
12
|
+
### 优化
|
|
13
|
+
- 发布类型 2 与 3 统一按应用维度处理:不再用历史版本回填缺失的包地址,未上传任何包时直接报错。
|
|
14
|
+
### 破坏性变更
|
|
15
|
+
- 未配置 `publish.publishType` 时,魔方发布的默认发布类型由 3 改为 2。
|
|
16
|
+
|
|
5
17
|
## 0.9.15 [2026-11-18]
|
|
6
18
|
<!-- generated-by: specs -->
|
|
7
19
|
### 优化
|
package/lib/actions/build.js
CHANGED
|
@@ -429,7 +429,7 @@ async function pullRemoteResources(opts) {
|
|
|
429
429
|
if (!repoPkg.scripts)
|
|
430
430
|
repoPkg.scripts = {};
|
|
431
431
|
if (opts.compiler === 'electron-vite') {
|
|
432
|
-
repoPkg.scripts['copy:
|
|
432
|
+
repoPkg.scripts['copy:electron'] = 'gmcb copy -s ./dist/build/h5 -d ../../out/renderer/{manifest.appid}/ --clean';
|
|
433
433
|
}
|
|
434
434
|
if (opts.compiler === 'gradlew') {
|
|
435
435
|
if (isUniappX) {
|
|
@@ -445,7 +445,7 @@ async function pullRemoteResources(opts) {
|
|
|
445
445
|
(0, child_process_1.execSync)('npm install', { cwd: repoDir, stdio: 'inherit' });
|
|
446
446
|
if (opts.compiler === 'electron-vite') {
|
|
447
447
|
(0, child_process_1.execSync)(`npm run build:h5:${buildEnv}`, { cwd: repoDir, stdio: 'inherit' });
|
|
448
|
-
(0, child_process_1.execSync)('npm run copy:
|
|
448
|
+
(0, child_process_1.execSync)('npm run copy:electron', { cwd: repoDir, stdio: 'inherit' });
|
|
449
449
|
const pkgPath = (0, path_1.join)(utils_1.COMMAND_PATH, 'package.json');
|
|
450
450
|
let pkgContent = (0, fs_1.readFileSync)(pkgPath, 'utf-8');
|
|
451
451
|
pkgContent = pkgContent.replace(/"productName":\s*"[^"]*"/, `"productName": "${appName}"`);
|
package/lib/apis/index.js
CHANGED
|
@@ -122,7 +122,7 @@ async function uploadVersion(params) {
|
|
|
122
122
|
async function publishVersion(params) {
|
|
123
123
|
try {
|
|
124
124
|
const { appId, remoteUrl, versionName, versionCode, versionDesc, platform, ...rest } = params;
|
|
125
|
-
const publishType = Number(rest.publishType ||
|
|
125
|
+
const publishType = Number(rest.publishType || 2);
|
|
126
126
|
const updateType = Number(rest.updateType || 2);
|
|
127
127
|
const updateMode = Number(rest.updateMode || 0);
|
|
128
128
|
await ensureLoggedIn();
|
|
@@ -190,14 +190,14 @@ async function publishVersion(params) {
|
|
|
190
190
|
fallbackFullUrl = '';
|
|
191
191
|
fallbackResUrl = '';
|
|
192
192
|
}
|
|
193
|
-
//
|
|
193
|
+
// 发布类型 > 1(应用维度,如子应用)允许 wgt/zip 只发一个,禁止用历史版本补齐另一包,
|
|
194
194
|
// 否则新版本链接会指向历史版本文件,客户端更新检查会一直命中历史版本。
|
|
195
|
-
if (publishType
|
|
195
|
+
if (publishType > 1) {
|
|
196
196
|
fallbackFullUrl = '';
|
|
197
197
|
fallbackResUrl = '';
|
|
198
198
|
}
|
|
199
|
-
if (publishType
|
|
200
|
-
throw new Error('
|
|
199
|
+
if (publishType > 1 && !fullUrl && !resUrl) {
|
|
200
|
+
throw new Error('非主应用(publishType > 1)发布未上传 wgt 或 zip 文件');
|
|
201
201
|
}
|
|
202
202
|
await postVersion({
|
|
203
203
|
id: versionId,
|