polyci 0.0.9 → 0.0.11
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/main.js +7 -2
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -141,6 +141,7 @@ function appendGlobalVariables(lines) {
|
|
|
141
141
|
lines.push(` IMAGE_DOCKER: docker:latest`);
|
|
142
142
|
lines.push(` IMAGE_COMPOSE: docker:cli`);
|
|
143
143
|
lines.push(` GIT_PACKAGE: git`);
|
|
144
|
+
lines.push(` GIT_STRATEGY: clone`);
|
|
144
145
|
lines.push(``);
|
|
145
146
|
lines.push(`stages:`);
|
|
146
147
|
lines.push(` - build`);
|
|
@@ -209,6 +210,7 @@ function appendModuleReleaseJob(lines, module) {
|
|
|
209
210
|
lines.push(` - cp -r ci $MODULE_PATH/ci`);
|
|
210
211
|
lines.push(` - cd $MODULE_PATH`);
|
|
211
212
|
lines.push(` - npm ci`);
|
|
213
|
+
lines.push(` - git tag -l "^${module.moduleName}-v(?<version>\\d+(\\.\\d+)*)-$CI_COMMIT_BRANCH-(?<increment>\\d+(\\.\\d+)*)$"`);
|
|
212
214
|
lines.push(` - npx semalease --tag-pattern "^${module.moduleName}-v(?<version>\\d+(\\.\\d+)*)-$CI_COMMIT_BRANCH-(?<increment>\\d+(\\.\\d+)*)$" semalease.env`);
|
|
213
215
|
lines.push(` - source semalease.env`);
|
|
214
216
|
lines.push(` - |`);
|
|
@@ -295,8 +297,11 @@ function appendGlobalReleaseJob(lines, modules, mainBranch, tagTemplate, branchT
|
|
|
295
297
|
lines.push(``);
|
|
296
298
|
lines.push(` - |`);
|
|
297
299
|
lines.push(` if [ "$TAG_CREATED" = true ]; then`);
|
|
298
|
-
lines.push(` git
|
|
299
|
-
lines.push(` git
|
|
300
|
+
lines.push(` git status`);
|
|
301
|
+
lines.push(` git commit -m "release: ${modules.map((m) => m.moduleName).join(", ")}"`);
|
|
302
|
+
lines.push(` git status`);
|
|
303
|
+
lines.push(` TARGET_BRANCH="\${CI_COMMIT_BRANCH:-\${CI_COMMIT_REF_NAME}}"`);
|
|
304
|
+
lines.push(` git push origin "HEAD:refs/heads/\${TARGET_BRANCH}"`);
|
|
300
305
|
lines.push(` git push origin --tags`);
|
|
301
306
|
lines.push(` else`);
|
|
302
307
|
lines.push(` echo "No new tags created; skipping commit/push"`);
|