Skip to content

Commit

Permalink
fix(core): fix changelog configuration (nrwl#20138)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz authored Nov 8, 2023
1 parent 80ec78a commit b4faf2d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
]
},
"release": {
"releaseTagPattern": "{version}",
"changelog": {
"workspaceChangelog": {
"createRelease": "github",
"file": false
}
},
"groups": {
"npm": {
"projects": [
Expand Down
4 changes: 2 additions & 2 deletions packages/nx/src/command-line/release/utils/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ export function parseGitCommit(commit: RawGitCommit): GitCommit | null {
};
}

export function getCommitHash(ref: string) {
export async function getCommitHash(ref: string) {
try {
return execCommand('git', ['rev-parse', ref]);
return (await execCommand('git', ['rev-parse', ref])).trim();
} catch (e) {
throw new Error(`Unknown revision: ${ref}`);
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/nx-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const LARGE_BUFFER = 1024 * 1000000;
maxBuffer: LARGE_BUFFER,
});

let changelogCommand = `pnpm nx release changelog ${options.version} --tagVersionPrefix="" --file false --create-release github --interactive`;
let changelogCommand = `pnpm nx release changelog ${options.version} --interactive workspace`;
if (options.from) {
changelogCommand += ` --from ${options.from}`;
}
Expand Down

0 comments on commit b4faf2d

Please sign in to comment.