polyci 0.0.4 → 0.0.5
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 +23 -20
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -217,31 +217,34 @@ function appendGlobalReleaseJob(lines, modules) {
|
|
|
217
217
|
lines.push("");
|
|
218
218
|
for (const module of modules) {
|
|
219
219
|
lines.push(` echo "Tagging release for ${module.moduleName} (${module.modulePath})"`);
|
|
220
|
-
lines.push(` if [
|
|
221
|
-
lines.push(`
|
|
222
|
-
lines.push("
|
|
223
|
-
lines.push("
|
|
224
|
-
lines.push(
|
|
225
|
-
lines.push("
|
|
226
|
-
lines.push("
|
|
227
|
-
lines.push(`
|
|
228
|
-
lines.push("
|
|
220
|
+
lines.push(` if [ -f "${module.modulePath}/semalease.env" ]; then`);
|
|
221
|
+
lines.push(` . "${module.modulePath}/semalease.env"`);
|
|
222
|
+
lines.push(" TAG_NAME=\"\"");
|
|
223
|
+
lines.push(" if [ \"$CI_COMMIT_BRANCH\" = \"main\" ]; then");
|
|
224
|
+
lines.push(" if [ \"${NEXT_VERSION:-}\" != \"${LATEST_VERSION:-}\" ]; then");
|
|
225
|
+
lines.push(` TAG_NAME="${module.moduleName}-v\${NEXT_VERSION}"`);
|
|
226
|
+
lines.push(" else");
|
|
227
|
+
lines.push(` echo "Version did not change for ${module.moduleName} on branch $CI_COMMIT_BRANCH, skipping tag"`);
|
|
228
|
+
lines.push(" fi");
|
|
229
|
+
lines.push(" else");
|
|
230
|
+
lines.push(" if [ \"${NEXT_VERSION:-}\" != \"${LATEST_VERSION:-}\" ] || [ \"${NEXT_INCREMENT:-}\" != \"${LATEST_INCREMENT:-}\" ]; then");
|
|
231
|
+
lines.push(` TAG_NAME="${module.moduleName}-v\${NEXT_VERSION}-\${CI_COMMIT_BRANCH}-\${NEXT_INCREMENT}"`);
|
|
232
|
+
lines.push(" else");
|
|
233
|
+
lines.push(` echo "Version/increment did not change for ${module.moduleName} on branch $CI_COMMIT_BRANCH, skipping tag"`);
|
|
234
|
+
lines.push(" fi");
|
|
229
235
|
lines.push(" fi");
|
|
230
|
-
lines.push(
|
|
231
|
-
lines.push(" else");
|
|
232
|
-
lines.push(" if [ \"${NEXT_VERSION:-}\" = \"${LATEST_VERSION:-}\" ] && [ \"${NEXT_INCREMENT:-}\" = \"${LATEST_INCREMENT:-}\" ]; then");
|
|
233
|
-
lines.push(` echo "Version/increment did not change for ${module.moduleName} on branch $CI_COMMIT_BRANCH, skipping tag"`);
|
|
234
|
-
lines.push(" continue");
|
|
235
|
-
lines.push(" fi");
|
|
236
|
-
lines.push(` TAG_NAME="${module.moduleName}-v\${NEXT_VERSION}-\${CI_COMMIT_BRANCH}-\${NEXT_INCREMENT}"`);
|
|
237
|
-
lines.push(" fi");
|
|
236
|
+
lines.push(" if [ \"$TAG_NAME\" != \"\" ]; then");
|
|
238
237
|
if (module.moduleType === "node-express") {
|
|
239
|
-
lines.push(`
|
|
238
|
+
lines.push(` git add "${module.modulePath}/package.json"`);
|
|
240
239
|
}
|
|
241
240
|
else if (module.moduleType === "node-vite") {
|
|
242
|
-
lines.push(`
|
|
241
|
+
lines.push(` git add "${module.modulePath}/package.json" "${module.modulePath}/public/release.json"`);
|
|
243
242
|
}
|
|
244
|
-
lines.push("
|
|
243
|
+
lines.push(" git tag \"$TAG_NAME\"");
|
|
244
|
+
lines.push(" fi");
|
|
245
|
+
lines.push(" else");
|
|
246
|
+
lines.push(` echo "Missing ${module.modulePath}/semalease.env, skipping ${module.moduleName}"`);
|
|
247
|
+
lines.push(" fi");
|
|
245
248
|
}
|
|
246
249
|
lines.push("");
|
|
247
250
|
lines.push(" git commit -m \"release: update affected modules\"");
|