cloudron 5.11.2 → 5.11.3
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/repo-actions.js +4 -4
package/package.json
CHANGED
package/src/repo-actions.js
CHANGED
|
@@ -66,15 +66,15 @@ async function tag(version, options) {
|
|
|
66
66
|
manifest.upstreamVersion = upstreamVersion;
|
|
67
67
|
fs.writeFileSync('CloudronManifest.json', JSON.stringify(manifest, null, 2));
|
|
68
68
|
|
|
69
|
-
//
|
|
70
|
-
const
|
|
69
|
+
// git branch --show-current does not work in CI :/
|
|
70
|
+
const mainOrMaster = safe.child_process.execSync('git branch -r --list origin/master origin/main', { encoding: 'utf8' });
|
|
71
71
|
if (safe.error) return exit('Could not determine branch name');
|
|
72
|
-
const branch =
|
|
72
|
+
const branch = mainOrMaster.includes('master') ? 'master' : 'main';
|
|
73
73
|
|
|
74
74
|
execSync(`git commit -a -m 'Version ${version}'`, { encoding: 'utf8' });
|
|
75
75
|
execSync(`git tag v${version} -a -m 'Version ${version}'`, { encoding: 'utf8' });
|
|
76
76
|
console.log(`git push --atomic origin ${branch} v${version}`);
|
|
77
|
-
execSync(`git push --atomic origin
|
|
77
|
+
execSync(`git push --atomic origin HEAD:${branch} v${version}`, { encoding: 'utf8' }); // push this tag only. in CI, we might have a git cache
|
|
78
78
|
if (safe.error) return exit(`Failed to push tag v${version} and branch ${branch}: ${safe.error.message}`, { encoding: 'utf8' });
|
|
79
79
|
|
|
80
80
|
console.log(`Created tag v${version} and pushed branch ${branch}`);
|