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

Show gooseBit version in UI #178

Closed
easybe opened this issue Nov 9, 2024 · 11 comments · Fixed by #191
Closed

Show gooseBit version in UI #178

easybe opened this issue Nov 9, 2024 · 11 comments · Fixed by #191
Assignees
Labels
enhancement New feature or request

Comments

@easybe
Copy link
Collaborator

easybe commented Nov 9, 2024

Having the gooseBit version (including Git hash for pre-releases) somewhere in the UI would be very handy.

@easybe easybe added the enhancement New feature or request label Nov 9, 2024
@easybe easybe changed the title Show version in UI Show gooseBit version in UI Nov 11, 2024
@b-rowan b-rowan self-assigned this Nov 12, 2024
@b-rowan
Copy link
Contributor

b-rowan commented Nov 12, 2024

Not sure exactly how to get the git hash integrated into there, this might work, but I assume reading the version should be easy enough. I'll start there.

@easybe
Copy link
Collaborator Author

easybe commented Nov 12, 2024

Personally, I like the “versioning with Git (tags) only” approach. Maybe this could work for us: https://pypi.org/project/poetry-git-version-plugin/

@b-rowan
Copy link
Contributor

b-rowan commented Nov 12, 2024

Personally, I like the “versioning with Git (tags) only” approach. Maybe this could work for us: https://pypi.org/project/poetry-git-version-plugin/

Just need to figure out how to store that somewhere as part of an action, which might be tough. This should be available to versions even if they're not being run from git.

The other option is we just try to source the git hash and use that, and if there is no git repo we use the project version.

@easybe
Copy link
Collaborator Author

easybe commented Nov 12, 2024

I don’t understand. Either the version is baked by the plugin into the package or retrieved from the repo. In which situation does that not work?

At least that is how the plugin should work IMHO. But, I haven’t looked at it.

@easybe
Copy link
Collaborator Author

easybe commented Nov 13, 2024

OK, I guess there is the situation where someone wants to run the app from a Git checkout and does not have Git installed or a tarball from GitHub. If we want to support those use cases, the plugin won't work.

@easybe
Copy link
Collaborator Author

easybe commented Nov 13, 2024

poetry-dynamic-versioning seems to be the better plugin.

@easybe
Copy link
Collaborator Author

easybe commented Nov 13, 2024

I actually don't really use Poetry. So, if these plugins don't support

. venv/bin/activate
pip install -e .
python -m goosebit

I am not a fan.

Still, I would really like to see versions like 0.3.0+g2b5f4d6 when running an untagged revision.

@easybe
Copy link
Collaborator Author

easybe commented Nov 13, 2024

I gave poetry-dynamic-versioning a quick try (#194) and it seems to work well enough with pip as well. However, there does not seem to be a fallback for when version control is not available. I don't know if that is a tradeoff we can live with.

Personally, I prefer not having to create "bump" commits, pushing a Git tag should be all it takes to create a release.

@b-rowan
Copy link
Contributor

b-rowan commented Nov 13, 2024

Personally, I prefer not having to create "bump" commits, pushing a Git tag should be all it takes to create a release.

I get what you mean, but not sure how else to do that. AFAIU it's not feasible for a tag to be pushed then the poetry version number updated, so I am ok with the extra step for now.

@easybe
Copy link
Collaborator Author

easybe commented Nov 13, 2024

With poetry-dynamic-versioning the workflow would be like this:

  • Push tag
  • The packages is built with the version deduced from tag
  • The Docker image build installs the package corresponding to the tag
  • pyproject.toml is not touched, it contains 0.0.0 as fake version

Would that not work for you?

@b-rowan
Copy link
Contributor

b-rowan commented Nov 13, 2024

With poetry-dynamic-versioning the workflow would be like this:

  • Push tag

  • The packages is built with the version deduced from tag

  • The Docker image installs the package corresponding to the tag

  • pyproject.toml is not touched, it contains 0.0.0 as fake version

Would that not work for you?

This seems fine, let me do some looking and I'll see.

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

Successfully merging a pull request may close this issue.

2 participants