-
Notifications
You must be signed in to change notification settings - Fork 4
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
Set DAEMON_VERSION
from git metadata
#30
Conversation
Idea: maybe the version constant can be externalized to an .env file so that |
So basically, it will only remain broken for building from git sources directly(where we could somehow set version from git tag instead, ideally)? The releases will have AppImages with correct versions, and sources with the correct versions too as per their release tags? EDIT: Ah it does not touch the release files -> could it? Or perhaps use tags for source builds if it matches the latest, and git hash for source builds where there's no direct tag for the commit. |
When the build is triggered via Docker (no matter if on GitHub CI or locally), the
If you prefer some other hard-coded version, you can use
I'm a little bit confused by the terms "releases", "versions" and "sources". The version of a GitHub Release is taken from a git tag. The version of an AppImage is also derived from git, it just adds a classifier for the distro. The source code is tagged in Git. So yes, everything matches and Git is the only location where the version is managed.
Sorry, I don't understand. There should be no chance for anything to get out-of-date.
The Do these explanations help a little bit? Do you have further questions or see problems with this approach? Does the code contain any other version numbers besides the |
I have just mostly migrated from the deprecated This let me fix the forever-somewhat-broken About menu, but it does mean that we have a new addition in the form of Unsure how to deal with it and at the moment am exhausted, will give the rest of your comment a proper response later. EDIT: This has predictably broken the entire CI, which should now probably build by means of
EDIT2: Siiigh, it's so broken, especially the EDIT3: Okay, that works. |
It seems a lot of things are involved now. I'll focus on the version here. I think that we should have a single location that contains the version. Currently, this is Regarding the build setup changes: It seems to be possible to use the version from git by setting |
Discussion on build failure moved to #36. |
Thaaat was the wrong number. |
So, with recent changes, we have version in We have these use cases:
I see you've covered pretty much everything already. I would change the versioning though, current one it not clear as to what commit it is:
I would suggest one of these formats instead if it's an out-of-tag version, so we get to keep the exact commit hash: |
Use cases are simpler IMHO. AppImage just calls Docker and doesn't need anything (uses Git Metadata already).
Have a look at the code: the |
I skimmed it and my understanding was that a-Z 0-9 + dots was valid |
Only local versions allow letters, separated by a + |
Python module packaging has a Version class that validates the allowed patterns, you can play with it to check. |
BTW, I just noticed that in the upstream repo are already a bunch of 0.4.9.* pre-releases, the latest is 0.4.9.12. Maybe we should change to 0.4.10, 0.5 or 1.0. |
Let me explain. Suppose that the last release is
Currently implemented daemon version:
|
OK, after reading the SO answers I think that The
|
I am starting to think we should stop caring about upstream as the project appears pretty much dead(kozec said he does not have access to his account anymore and does not seem on caring to restore it or create a new one), and just do whatever versioning we want. 0.4.10 at minimum is a good idea to do after I am done breaking things constantly with the beta releases.
The number of the commit(X) will always be higher on any subsequent commit, so whatever we do after X is irrelevant, no?
Looks good to me! |
The last commit removes all the manual version fiddling and delegates to This approach has one downside: setuptools must be run for the version to exist. This breaks the tests currently because I don't know how to tell them about the version. Could you have a look? Maybe the |
I figured it out. This PR now contains the following changes:
What's left for here or seperate PR(s):
|
Focal AppImage does not show About dialog:
All other AppImages work fine. |
Is there anything we get out of supporting focal going forward, outside of having to keep multiple focal-specific workarounds? If I recall correctly, your AppImage testing has shown that everything that works on focal also works on jammy, with that in mind, considering Python 3.8 is also EOL at the end of this month, we could simply drop distributions that do not ship 3.9+ (which I believe is only focal as bullseye is 3.9) and bump minimum Python req to 3.9. Other than that, we could do some awful ImportError trycatch. |
I agree that it's not worth to put efforts into supporting non-critical features for a distro that is EOL soon. So maybe it's best to leave the About dialog broken in Focal and prepare a PR for removal of Focal in 04/25. |
Let's deal with the rest of things elsewhere, thanks a lot for implementing this! |
I have ended up bumping the minimum Python version to 3.9 in the pyproject.toml and README.
|
This is a proposal for #14 that reads the
DAEMON_VERSION
from git metadata and replaces the value of the constant at build time.With this approach, the constant in constants.py is not versioned in git. It could be changed to something like
dev
,latest
,local
or the like.When the
GIT_DESCRIPTION
build-arg is set, the daemon version is determined automatically. Alternatively, the build-argDAEMON_VERSION
may be set explicitely (merely for debugging and local experiments).Examples
DAEMON_VERSION
References