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

[Question] How to get version information when executing tagpr.command #164

Open
k2tzumi opened this issue Dec 12, 2023 · 1 comment
Open

Comments

@k2tzumi
Copy link
Contributor

k2tzumi commented Dec 12, 2023

When tagpr generates a PullRequest for a release, is it possible to get the following information from the shell specified in the commnad?

  • Next version number
  • Current version number

The reason for wanting to get the version number is that, apart from CHANGELOG, we want to automatically output the changes in the OpenAPI specification between release versions

I performed the following verification in the shell of tagpr.command, but could not get the version information.

  • Checked for version information in environment variables.
  • I guessed the version information from the information in event.json( $GITHUB_EVENT_PATH )
  • I used the gh command to get the latest version. 
    I could check the version of latest, but the next version has to be calculated, but I can't determine if it is major, minor, or patch
  • Extract from the version listed in CHANGELOG.md
    The tagpr.command cannot identify this version because the execution is done before the CHANGELOG.md is updated.

If we can get the version in tagpr.command, we can update multiple versions of the following Issue.
#152

@k2tzumi
Copy link
Contributor Author

k2tzumi commented Dec 29, 2023

@Songmu

I have read the tagpr source and feel that it is not possible to get the version information from the shell specified in the commnad.
This is a suggestion for improvement, but which of the following suggestions would be preferable?

  • Set environment variables so that version information can be referenced when commnad is executed.
  • The timing when commnad is executed should be after the updated CHANGELOG.md is committed.
    Add post-command separately from existing commnad, considering the impact on existing commnad.

Personally, I would recommend the first option as it has a limited scope of modification and less impact.

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

No branches or pull requests

1 participant