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 +1 -1
- package/src/appstore-actions.js +6 -2
package/package.json
CHANGED
package/src/appstore-actions.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
}
|