Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ng-dev/release): fetch release notes compare tag and store it locally #207

Merged

Conversation

devversion
Copy link
Member

The release notes compare tag might not exist locally if the local
repository has not been synced with upstream. We fetch the release
notes compare tag in order to be able to build the changelog. Our
current fetch logic incorrectly stores the tag reference in
FETCH_HEAD, while we want it to be stored locally. This commit
fixes that.

@google-cla google-cla bot added the cla: yes label Sep 8, 2021
// We forcibly override existing local tags that are named similar as we will fetch
// the correct tag for release notes comparison from the upstream remote.
this.git.run(['fetch', '--force', this.git.getRepoGitUrl(),
`refs/tags/${releaseNotesCompareTag}:refs/tags/${releaseNotesCompareTag}`]);
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that tag <name> would also work as refspec but I think it's better being explicit here. Quote from Git docs:

tag means the same as refs/tags/:refs/tags/; it requests fetching everything up to the given tag.

…ally

The release notes compare tag might not exist locally if the local
repository has not been synced with upstream. We fetch the release
notes compare tag in order to be able to build the changelog. Our
current fetch logic incorrectly stores the tag reference in
`FETCH_HEAD`, while we want it to be stored locally. This commit
fixes that.
Copy link
Member

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

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

LGTM

@devversion devversion force-pushed the fix/release-fetch-local-tag-properly branch 2 times, most recently from 4c8f5ee to 5201add Compare September 8, 2021 18:05
@devversion devversion added the action: merge The PR is ready for merge by the caretaker label Sep 8, 2021
@devversion devversion marked this pull request as ready for review September 8, 2021 18:10
@devversion devversion merged commit c5da4aa into angular:main Sep 8, 2021
@devversion devversion deleted the fix/release-fetch-local-tag-properly branch September 8, 2021 18:10
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants