polyci 0.0.10 → 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.
Files changed (2) hide show
  1. package/dist/main.js +7 -3
  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,7 +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`);
212
- lines.push(` - git tag -l "ui-v*-$CI_COMMIT_BRANCH-*"`);
213
+ lines.push(` - git tag -l "^${module.moduleName}-v(?<version>\\d+(\\.\\d+)*)-$CI_COMMIT_BRANCH-(?<increment>\\d+(\\.\\d+)*)$"`);
213
214
  lines.push(` - npx semalease --tag-pattern "^${module.moduleName}-v(?<version>\\d+(\\.\\d+)*)-$CI_COMMIT_BRANCH-(?<increment>\\d+(\\.\\d+)*)$" semalease.env`);
214
215
  lines.push(` - source semalease.env`);
215
216
  lines.push(` - |`);
@@ -296,8 +297,11 @@ function appendGlobalReleaseJob(lines, modules, mainBranch, tagTemplate, branchT
296
297
  lines.push(``);
297
298
  lines.push(` - |`);
298
299
  lines.push(` if [ "$TAG_CREATED" = true ]; then`);
299
- lines.push(` git commit -m "release: update affected modules"`);
300
- lines.push(` git push origin HEAD`);
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}"`);
301
305
  lines.push(` git push origin --tags`);
302
306
  lines.push(` else`);
303
307
  lines.push(` echo "No new tags created; skipping commit/push"`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "polyci",
3
3
  "description": "Monorepo CI/CD utilities.",
4
- "version": "0.0.10",
4
+ "version": "0.0.11",
5
5
  "type": "module",
6
6
  "private": false,
7
7
  "author": "Alexander Tsarev",