Navigation Menu

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

Account for custom tag name when retrieving latest tag #722

Merged
merged 8 commits into from Jan 24, 2021

Conversation

SuaYoo
Copy link
Contributor

@SuaYoo SuaYoo commented Jan 6, 2021

Addresses #708, based on @jsamr's suggestion (#708 (comment))

Context

We're differentiating releases between monorepo packages by prefixing tags with packageName/v. I realized that the latest tag applied to the entire repo, which was not the behavior I expected when specifying a custom tagName.

Prior to proposed changes, you can see that running release-it for a package named "react-client" returns the latest tag for the "webrtc" package, which is in the same repo:

$ git describe --tags --abbrev=0  [cached]
  release-it:config { latestTag: 'webrtc/v2.2.5' } +3ms
# ... truncated
  release-it:config { name: 'webrtc',
  release-it:config   latestVersion: '1.0.0',
  release-it:config   version: undefined,
  release-it:config   changelog:
  release-it:config    '### [1.0.1](https://github.com/team-telnyx/webrtc/compare/webrtc/v2.2.5...react-client/v1.0.1) (2021-01-06)\n\n\n### Features\n\n* Generate API docs from TS ([#115](https://github.com/team-telnyx/webrtc/issues/115)) ([66882d2](https://github.com/team-telnyx/webrtc/commit/66882d28f41ec458d6f28d4f54d218e21a780cfd))' } +405ms

Both latest tag and conventional-changelog works as expected after applying proposed changes:

$ git describe --tags --match "react-client/v*" --abbrev=0  [cached]
  release-it:config { latestTag: 'react-client/v1.0.0' } +4ms
# ... truncated
  release-it:config { name: 'webrtc',
  release-it:config   latestVersion: '1.0.0',
  release-it:config   version: undefined,
  release-it:config   changelog:
  release-it:config    '### [1.0.1](https://github.com/team-telnyx/webrtc/compare/react-client/v1.0.0...react-client/v1.0.1) (2021-01-06)\n\n\n### Features\n\n* Generate API docs from TS ([#115](https://github.com/team-telnyx/webrtc/issues/115)) ([66882d2](https://github.com/team-telnyx/webrtc/commit/66882d28f41ec458d6f28d4f54d218e21a780cfd))' } +395ms

@SuaYoo
Copy link
Contributor Author

SuaYoo commented Jan 7, 2021

Seeing a test fail with fatal: ambiguous argument '2.0.1': unknown revision or path not in the working tree. that I can't replicate locally, investigating

@SuaYoo
Copy link
Contributor Author

SuaYoo commented Jan 7, 2021

@webpro, any insight on the failing test?

@webpro
Copy link
Collaborator

webpro commented Jan 17, 2021

Thanks @SuaYoo! Looks good.

The failing test is caused by the fact that the tags are not fetched in the github action, and the stub for this command was missing in the test. I added the stubs in the master branch (in e56f378), so could you please merge this to your PR branch?

@SuaYoo SuaYoo marked this pull request as ready for review January 19, 2021 17:22
@SuaYoo
Copy link
Contributor Author

SuaYoo commented Jan 19, 2021

Thanks @webpro, tests are passing now.

Side note, on the subject of stubs--minor issue but it seems the upstream URL stub for should release to git.pushRepo isn't working. #730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants