cloudron 5.11.9 → 5.11.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudron",
3
- "version": "5.11.9",
3
+ "version": "5.11.10",
4
4
  "license": "MIT",
5
5
  "description": "Cloudron Commandline Tool",
6
6
  "main": "main.js",
@@ -370,15 +370,19 @@ async function approve(localOptions, cmd) {
370
370
  // Git repo pre-flight checks: checking if latest tag matches latest commit
371
371
  defaultBranch = safe.child_process.execSync(`git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'`, { encoding: 'utf8' });
372
372
  if (safe.error) return exit(`Failed to get default branch: ${safe.error.message}`);
373
+ defaultBranch = defaultBranch.trim();
373
374
 
374
- const defaultBranchSha = safe.child_process.execSync(`git rev-parse ${defaultBranch}`, { encoding: 'utf8' });
375
+ let defaultBranchSha = safe.child_process.execSync(`git rev-parse ${defaultBranch}`, { encoding: 'utf8' });
375
376
  if (safe.error) return exit(`Failed to get head of ${defaultBranch}: ${safe.error.message}`);
377
+ defaultBranchSha = defaultBranchSha.trim();
376
378
 
377
379
  latestTag = safe.child_process.execSync('git describe --tags --abbrev=0', { encoding: 'utf8' });
378
380
  if (safe.error) return exit(`Failed to get latest tag: ${safe.error.message}`);
381
+ latestTag = latestTag.trim();
379
382
 
380
- const latestTagSha = safe.child_process.execSync(`git rev-list -n 1 ${latestTag}`, { encoding: 'utf8' });
383
+ let latestTagSha = safe.child_process.execSync(`git rev-list -n 1 ${latestTag}`, { encoding: 'utf8' });
381
384
  if (safe.error) return exit(`Failed to get head of ${defaultBranch}: ${safe.error.message}`);
385
+ latestTagSha = latestTagSha.trim();
382
386
 
383
387
  if (defaultBranchSha !== latestTagSha) return exit(`Latest tag ${latestTag} does not match HEAD of ${defaultBranch}`);
384
388
  }