cloudron 5.11.1 → 5.11.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.
- package/package.json +1 -1
- package/src/repo-actions.js +8 -6
package/package.json
CHANGED
package/src/repo-actions.js
CHANGED
|
@@ -67,15 +67,17 @@ async function tag(version, options) {
|
|
|
67
67
|
fs.writeFileSync('CloudronManifest.json', JSON.stringify(manifest, null, 2));
|
|
68
68
|
|
|
69
69
|
// set GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL if needed
|
|
70
|
-
const
|
|
70
|
+
const rawBranch = safe.child_process.execSync('git branch --show-current', { encoding: 'utf8' }); // master or main
|
|
71
71
|
if (safe.error) return exit('Could not determine branch name');
|
|
72
|
+
const branch = rawBranch.trim();
|
|
72
73
|
|
|
73
|
-
execSync(`git commit -a -m 'Version ${version}'
|
|
74
|
-
execSync(`git tag v${version} -a -m 'Version ${version}'
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
execSync(`git commit -a -m 'Version ${version}'`, { encoding: 'utf8' });
|
|
75
|
+
execSync(`git tag v${version} -a -m 'Version ${version}'`, { encoding: 'utf8' });
|
|
76
|
+
console.log(`git push --atomic origin ${branch} v${version}`);
|
|
77
|
+
execSync(`git push --atomic origin ${branch} v${version}`, { encoding: 'utf8' }); // push this tag only. in CI, we might have a git cache
|
|
78
|
+
if (safe.error) return exit(`Failed to push tag v${version} and branch ${branch}: ${safe.error.message}`, { encoding: 'utf8' });
|
|
77
79
|
|
|
78
|
-
console.log(
|
|
80
|
+
console.log(`Created tag v${version} and pushed branch ${branch}`);
|
|
79
81
|
}
|
|
80
82
|
|
|
81
83
|
async function publish(options) {
|