@edifice.io/cli 1.6.0-develop.8 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/cli",
3
- "version": "1.6.0-develop.8",
3
+ "version": "1.6.0",
4
4
  "description": "Edifice Frontend CLI",
5
5
  "keywords": [
6
6
  "frontend",
@@ -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
- return branchConfig.prerelease ? isPrereleaseTag : !isPrereleaseTag;
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
@@ -99,6 +105,7 @@ export const publish = async (options) => {
99
105
  ).all.filter((c) => {
100
106
  const exclude = [
101
107
  c.message.startsWith("Merge branch "), // No merge commits
108
+ c.message.includes("version & publish"), // No version bump commits
102
109
  c.message.startsWith(releaseCommitMsg("")), // No example update commits
103
110
  ].some(Boolean);
104
111
 
@@ -155,7 +162,6 @@ export const publish = async (options) => {
155
162
  RELEASE_ALL = true;
156
163
  }
157
164
  }
158
-
159
165
  return releaseLevel;
160
166
  },
161
167
  -1,
@@ -226,6 +232,8 @@ export const publish = async (options) => {
226
232
  const changed = changedFiles.some(
227
233
  (file) =>
228
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")) ||
229
237
  file.startsWith(path.join(pkg.packageDir, "package.json")),
230
238
  );
231
239
  return changed;
@@ -391,7 +399,6 @@ export const publish = async (options) => {
391
399
 
392
400
  console.info();
393
401
  console.info("Committing changes...");
394
- //execSync(`git add -A && git commit -m "${releaseCommitMsg(version)}"`);
395
402
  execSync(
396
403
  `git add -A && git reset -- ${changedPackages
397
404
  .map((pkg) => path.resolve(rootDir, pkg.packageDir, "package.json"))
@@ -402,12 +409,12 @@ export const publish = async (options) => {
402
409
  .map((pkg) => path.resolve(rootDir, pkg.packageDir, "package.json"))
403
410
  .join(" ")}`,
404
411
  );
405
- execSync(`git commit -m "${releaseCommitMsg(version)}" --allow-empty`);
412
+ execSync(`git commit -m "${releaseCommitMsg(version)}" --allow-empty -n`);
406
413
  console.info(" Committed Changes.");
407
414
 
408
415
  console.info();
409
416
  console.info("Pushing changes...");
410
- execSync("git push");
417
+ execSync(`git push origin ${currentGitBranch()}`);
411
418
  console.info(" Changes pushed.");
412
419
 
413
420
  console.info();