-
Notifications
You must be signed in to change notification settings - Fork 250
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
Improved versioning #738
Improved versioning #738
Commits on Nov 19, 2023
-
Move fallback version to VERSION file
Previously, if not installed and no git version could be deduced, a hardcoded 3.0.2 version was used. Now, this fallback version is moved into an external VERSION file and is changed to "unreleased" instead of "3.0.2", to ensure that a proper version is only returned when it is really correct. This also makes it easier to update the version number for releases, and prepares for having a single place in the code to store the release version.
Configuration menu - View commit details
-
Copy full SHA for 5fd8ae2 - Browse repository at this point
Copy the full SHA 5fd8ae2View commit details -
Move version detection into its own file
This prepares for using this code from waf, since it can now be imported without additional (gtk) dependencies.
Configuration menu - View commit details
-
Copy full SHA for 5dc1074 - Browse repository at this point
Copy the full SHA 5dc1074View commit details -
Remove duplicated version detection code from waf/wscript
This allows running the src/hamster/version.py file as a standalone script that just outputs the version number and lets wscript call that. This ensures that the exact same version number is used between installed and non-installed versions, and removes the second place where the release version was previously hardcoded. To do this, the version.py code is split into a part that decides the version when installed, and a bit that decides the version when running from the source tree. This is needed since when running the script from waf, sys.path is not set up to allow importing hamster.defs, and trying this might result in importing hamster.defs from a system-wide installed hamster instead of the current source dir. So just skip the installed-version detection entirely when running from waf, it is not relevant anyway.
Configuration menu - View commit details
-
Copy full SHA for 99cef05 - Browse repository at this point
Copy the full SHA 99cef05View commit details -
Strip v prefix when using git tag as version number
Released versions omitted the v prefix (to make proper semantic versions), but version numbers autodetected from git would not, leading to discrepancies. This fixes that.
Configuration menu - View commit details
-
Copy full SHA for e9a6a35 - Browse repository at this point
Copy the full SHA e9a6a35View commit details -
Drop .GUI from metainfo.xml file
This file is mostly used by packaging tools, such as flatpak, to get info about the application. Since flatpak uses org.gnome.Hamster as the main package id, the metainfo.xml must be named the same for it to be used. Possibly more things need to be renamed for all application ids to be consistent, but it is non-obvious what the best approach is there (see also #725 for details). For now, this pragmatically renames metainfo.xml to ensure it is found by flatpak.
Configuration menu - View commit details
-
Copy full SHA for 9ac904b - Browse repository at this point
Copy the full SHA 9ac904bView commit details -
Add version number to metainfo.xml file
This is now done by waf at install time and ensures that flatpak knows the hamster version of the build.
Configuration menu - View commit details
-
Copy full SHA for 8a82dc3 - Browse repository at this point
Copy the full SHA 8a82dc3View commit details -
Hardcode fake release date in metainfo.xml
Without a release date, flatpak ignores the version number, but autodetecting the release date (and carrying it into tarballs) might be too much work, so just hardcode an obviously fake date for now.
Configuration menu - View commit details
-
Copy full SHA for 5bdd423 - Browse repository at this point
Copy the full SHA 5bdd423View commit details -
This was not actually used in practice and no longer matches the recent changes to the version handling, so remove it.
Configuration menu - View commit details
-
Copy full SHA for 7b51320 - Browse repository at this point
Copy the full SHA 7b51320View commit details -
This was added a long time ago only for the database backend, but seems to be outdated. In general, hamster cannot be installed using setup.py anyway, since it requires dbus service files, gsettings schemas, etc. so waf is used for all that. Remove setup.py which is no longer used anyway. This fixes #581.
Configuration menu - View commit details
-
Copy full SHA for 3875623 - Browse repository at this point
Copy the full SHA 3875623View commit details -
CI: Let github workflow use version number in the flatpak filename
Note: For pull requests, the version that is tested is an autogenerated temporary merge commit (which is good, since it tests whether things work *after* merging), but that commit id is also included in the filename which might be bit suprising. To be considered later.
Configuration menu - View commit details
-
Copy full SHA for c062980 - Browse repository at this point
Copy the full SHA c062980View commit details