Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "Improve performance for publishing on filtered clones.",
"type": "none",
"packageName": "@microsoft/rush"
}
],
"packageName": "@microsoft/rush",
"email": "aramissennyeydd@users.noreply.github.com"
}
4 changes: 2 additions & 2 deletions libraries/rush-lib/src/cli/actions/VersionAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,14 @@ export class VersionAction extends BaseRushAction {
}

if (changeLogUpdated || packageJsonUpdated) {
await publishGit.pushAsync(tempBranch, !this._ignoreGitHooksParameter.value);
await publishGit.pushAsync(tempBranch, !this._ignoreGitHooksParameter.value, false);

// Now merge to target branch.
await publishGit.fetchAsync();
await publishGit.checkoutAsync(targetBranch);
await publishGit.pullAsync(!this._ignoreGitHooksParameter.value);
await publishGit.mergeAsync(tempBranch, !this._ignoreGitHooksParameter.value);
await publishGit.pushAsync(targetBranch, !this._ignoreGitHooksParameter.value);
await publishGit.pushAsync(targetBranch, !this._ignoreGitHooksParameter.value, false);
await publishGit.deleteBranchAsync(tempBranch, true, !this._ignoreGitHooksParameter.value);
} else {
// skip commits
Expand Down
8 changes: 6 additions & 2 deletions libraries/rush-lib/src/logic/PublishGit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ export class PublishGit {
]);
}

public async pushAsync(branchName: string | undefined, verify: boolean = false): Promise<void> {
public async pushAsync(
branchName: string | undefined,
verify: boolean = false,
followTags: boolean = true
): Promise<void> {
await PublishUtilities.execCommandAsync(
!!this._targetBranch,
this._gitPath,
Expand All @@ -153,7 +157,7 @@ export class PublishGit {
'push',
'origin',
`HEAD:${branchName || DUMMY_BRANCH_NAME}`,
'--follow-tags',
...(followTags ? ['--follow-tags'] : []),
'--verbose',
...(verify ? [] : ['--no-verify'])
]
Expand Down