Skip to content

Commit

Permalink
fix(semver): sync versioning when skipProjectChangelog (#446)
Browse files Browse the repository at this point in the history
closes #408
  • Loading branch information
TriPSs authored and edbzn committed Feb 18, 2022
1 parent 46768f4 commit b0cdc58
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions packages/semver/src/executors/version/version.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { resolve } from 'path';
import { forkJoin, noop, Observable, of } from 'rxjs';
import { concat, forkJoin, noop, Observable, of } from 'rxjs';
import { concatMap, reduce, switchMap } from 'rxjs/operators';
import * as standardVersion from 'standard-version';

Expand Down Expand Up @@ -45,27 +45,26 @@ export function versionWorkspace({
}: {
skipRootChangelog: boolean;
} & CommonVersionOptions) {
return getProjectRoots(options.workspaceRoot).pipe(
concatMap((projectRoots) =>
_generateProjectChangelogs({
projectRoots,
...options,
})
),
/* Run Git add only once, after changelogs get generated in parallel. */
concatMap((changelogPaths) =>
addToStage({ paths: changelogPaths, dryRun: options.dryRun })
return concat(
getProjectRoots(options.workspaceRoot).pipe(
concatMap((projectRoots) =>
_generateProjectChangelogs({
projectRoots,
...options,
})
),
/* Run Git add only once, after changelogs get generated in parallel. */
concatMap((changelogPaths) =>
addToStage({ paths: changelogPaths, dryRun: options.dryRun })
)
),
reduce(noop),
concatMap(() =>
getPackageFiles(options.workspaceRoot).pipe(
switchMap((packageFiles) =>
_runStandardVersion({
bumpFiles: packageFiles,
skipChangelog: skipRootChangelog,
...options,
})
)
getPackageFiles(options.workspaceRoot).pipe(
switchMap((packageFiles) =>
_runStandardVersion({
bumpFiles: packageFiles,
skipChangelog: skipRootChangelog,
...options,
})
)
)
);
Expand Down

0 comments on commit b0cdc58

Please sign in to comment.