@edifice.io/cli 1.6.0-develop.9 → 1.6.0
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/publish/index.js +10 -4
package/package.json
CHANGED
package/src/publish/index.js
CHANGED
|
@@ -44,7 +44,13 @@ export const publish = async (options) => {
|
|
|
44
44
|
// Filter tags based on whether the branch is a release or pre-release
|
|
45
45
|
.filter((t) => {
|
|
46
46
|
const isPrereleaseTag = semver.prerelease(t) !== null;
|
|
47
|
-
|
|
47
|
+
const prereleaseBranch = semver.prerelease(t)?.[0];
|
|
48
|
+
// For prerelease branches, only include tags for that branch
|
|
49
|
+
if (branchConfig.prerelease) {
|
|
50
|
+
return isPrereleaseTag && prereleaseBranch === branchName;
|
|
51
|
+
}
|
|
52
|
+
// For main branch, exclude all prereleases
|
|
53
|
+
return !isPrereleaseTag;
|
|
48
54
|
})
|
|
49
55
|
// sort by latest
|
|
50
56
|
// @ts-ignore
|
|
@@ -97,7 +103,6 @@ export const publish = async (options) => {
|
|
|
97
103
|
const rawCommitsLog = (
|
|
98
104
|
await simpleGit().log({ from: rangeFrom, to: "HEAD" })
|
|
99
105
|
).all.filter((c) => {
|
|
100
|
-
console.log(c.message);
|
|
101
106
|
const exclude = [
|
|
102
107
|
c.message.startsWith("Merge branch "), // No merge commits
|
|
103
108
|
c.message.includes("version & publish"), // No version bump commits
|
|
@@ -227,6 +232,8 @@ export const publish = async (options) => {
|
|
|
227
232
|
const changed = changedFiles.some(
|
|
228
233
|
(file) =>
|
|
229
234
|
file.startsWith(path.join(pkg.packageDir, "src")) ||
|
|
235
|
+
// check if any files in the assets directory were modified
|
|
236
|
+
file.startsWith(path.join(pkg.packageDir, "assets")) ||
|
|
230
237
|
file.startsWith(path.join(pkg.packageDir, "package.json")),
|
|
231
238
|
);
|
|
232
239
|
return changed;
|
|
@@ -392,7 +399,6 @@ export const publish = async (options) => {
|
|
|
392
399
|
|
|
393
400
|
console.info();
|
|
394
401
|
console.info("Committing changes...");
|
|
395
|
-
//execSync(`git add -A && git commit -m "${releaseCommitMsg(version)}"`);
|
|
396
402
|
execSync(
|
|
397
403
|
`git add -A && git reset -- ${changedPackages
|
|
398
404
|
.map((pkg) => path.resolve(rootDir, pkg.packageDir, "package.json"))
|
|
@@ -403,7 +409,7 @@ export const publish = async (options) => {
|
|
|
403
409
|
.map((pkg) => path.resolve(rootDir, pkg.packageDir, "package.json"))
|
|
404
410
|
.join(" ")}`,
|
|
405
411
|
);
|
|
406
|
-
execSync(`git commit -m "${releaseCommitMsg(version)}" --allow-empty`);
|
|
412
|
+
execSync(`git commit -m "${releaseCommitMsg(version)}" --allow-empty -n`);
|
|
407
413
|
console.info(" Committed Changes.");
|
|
408
414
|
|
|
409
415
|
console.info();
|