Skip to content

Commit

Permalink
fix(core): fix changelog configuration (#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

1 comment on commit b4faf2d

@vercel
Copy link

@vercel vercel bot commented on b4faf2d Nov 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx.dev
nx-five.vercel.app

Please sign in to comment.