@taole/deploy-helper 0.7.1 → 0.7.2

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.
@@ -175,7 +175,7 @@ export function checkOfflinePkg(config) {
175
175
 
176
176
  // 如果offlineConfig.remove为true,则不构建离线包
177
177
  const willRemovePkg = offlineConfig && offlineConfig.name && offlineConfig.remove === true && offlineConfig.skip !== true;
178
- const willSkip = !offlineConfig || !offlineConfig.name || offlineConfig.skip === true;
178
+ const willSkip = !offlineConfig || !offlineConfig.name || offlineConfig.skip === true || (offlineConfig.onlyTest === true && config.mode === "prod");
179
179
  if (willRemovePkg) {
180
180
  return {
181
181
  canBuild: true,
@@ -222,6 +222,9 @@ export function checkOfflinePkg(config) {
222
222
  errorMsg: ""
223
223
  }
224
224
  }
225
+ if (offlineConfig.onlyTest === true && config.mode === "prod") {
226
+ console.log(`离线包${offlineConfig.name}只用于测试环境, 跳过构建线上环境的离线包构建`);
227
+ }
225
228
  return {
226
229
  canBuild: true,
227
230
  errorMsg: "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taole/deploy-helper",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "脚本部署工具,用于将项目部署到测试环境或生产环境",
5
5
  "main": "index.mjs",
6
6
  "type": "module",