@hed-hog/cli 0.0.111 → 0.0.112

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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hed-hog/cli",
3
- "version": "0.0.111",
3
+ "version": "0.0.112",
4
4
  "description": "HedHog CLI tool",
5
5
  "author": "HedHog",
6
6
  "private": false,
@@ -239,6 +239,7 @@ function promote() {
239
239
  }
240
240
 
241
241
  printStep('Merging master → production');
242
+ const headBefore = runGit(['rev-parse', 'HEAD']).stdout;
242
243
  const mergeArgs = appsArg
243
244
  ? ['merge', '--no-ff', '-m', `chore: deploy to production [deploy:${appsArg}]`, 'master']
244
245
  : ['merge', '--no-ff', '--no-edit', 'master'];
@@ -251,7 +252,20 @@ function promote() {
251
252
  ' Resolve conflicts manually and retry.',
252
253
  );
253
254
  }
254
- printDone();
255
+
256
+ const headAfter = runGit(['rev-parse', 'HEAD']).stdout;
257
+ const alreadyUpToDate = headBefore === headAfter;
258
+
259
+ if (alreadyUpToDate) {
260
+ printDone('already up to date');
261
+ printInfo('No new commits from master — creating redeploy commit to trigger CI');
262
+ const redeployMsg = appsArg
263
+ ? `chore: redeploy [deploy:${appsArg}]`
264
+ : 'chore: redeploy all apps';
265
+ runGit(['commit', '--allow-empty', '-m', redeployMsg]);
266
+ } else {
267
+ printDone();
268
+ }
255
269
 
256
270
  printStep('Pushing production to origin');
257
271
  if (productionCreatedNow || !productionRemoteExists) {