-
Notifications
You must be signed in to change notification settings - Fork 431
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
Add a build-number input to the AIO workflow #1935
base: maintenance/gramps60
Are you sure you want to change the base?
Add a build-number input to the AIO workflow #1935
Conversation
@Nick-Hall can you run an AIO build on this branch please. |
Observation: For should these be aligned? |
The "r1" part comes from this piece of code With this PR
Here's the first page of the installation wizard with this PR applied, DEV_VERSION=False and a build-number of "beta1"
I'll take a look... |
aio/build.sh
Outdated
@@ -142,7 +146,11 @@ cp /mingw64/share/icons/hicolor/scalable/places/*.svg /mingw64/share/icons/gnome | |||
# build gramps | |||
rm -rf dist aio/dist | |||
python setup.py bdist_wheel | |||
appbuild="r$(git rev-list --count HEAD)-$(git rev-parse --short HEAD)" | |||
if `grep -q '^DEV_VERSION\s*=\s*True' gramps/version.py`; then | |||
appbuild="r$(git rev-list --count HEAD)-$(git rev-parse --short HEAD)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git describe
is perhaps clearer and definitely simpler. Today's gramps60 HEAD produces v6.0.0-beta1-27-gf5e551c3f
, composed of the tag, the number of commits following the tag, and the shortened sha1 of the commit. If the commit is tagged git describe
returns just the tag, e.g.:
> git describe v6.0.0-beta1
v6.0.0-beta1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nick-Hall do you always tag before you do the release build? If so git describe
looks like a good improvement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We should probably use git describe
instead of our existing get_git_revision
script. The Gramps version reported from the command line and shown in the About dialog is wrong.
> python Gramps.py -v
6.0.0-beta2-149fb610ca
I bump the version number after each release and this is misleading.
I'll investiage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plus build.sh
just uses VERSION_TUPLE
so it loses the beta1
part making it even more misleading.
master
's VERSION_TUPLE is 6.0.0 and its last tag is v5.2.4; neither is really right. In that case maybe "$(git branch)-$(git rev-list --count HEAD)-$(git rev-parse --short HEAD)"
would be most correct... but perhaps we don't build AIOs from master
so it doesn't matter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "beta1" part is injected in via a workflow input and used if DEV_VERSION in version.py is False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using git describe
works well to provide a better description of development versions . See PR #1938.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "beta1" part is injected in via a workflow input and used if DEV_VERSION in version.py is False
That misses the point. 6.0.0-r1-5a76f63
as a dev build tag is misleading because there is no 6.0.0 yet.
The table below shows the results of running
Note: By default the workflow checkout action only fetches a single commit. See https://github.com/actions/checkout/blob/v4/README.md |
The development version should be: The production version would ideally have the build number added: |
That comes from
When I run |
@fxtmtrsine I've simply removed the " -- a new maintenance release" suffix. |
|
You could get the version qualifier with:
For a development release you could get the appbuild with:
and use the $2 parameter for production releases. |
e3265d4
to
e98731f
Compare
@stevenyoungs It would still be useful to add a build number to a non-development release. I created 3 Windows builds for 6.0.0-beta1. |
For DEV_VERSION use "<branch_name>-<short_commit_id>" else use "<VERSION_QUALIFIER>-<build-number>"
1ca405f
to
aba610e
Compare
I've revised the approach based on earlier feedback. For DEV_VERSION=True it uses "<branch_name>-<short_commit_id>". For other builds it uses "<VERSION_QUALIFIER>-" The table below shows the output for both values of DEV_VERSION on a branch called
@Nick-Hall this is ready for review. I ran both builds in my own github repo but it would be good to get an AIO build run in the official repo too. |
This is OK for beta releases and the like but I'm not comfortable with modifying Gramps code to reflect a packaging change. I'd be a lot happierf it can work by looking up something in the bundle, maybe an environment variable.
I think you mean that it took you three tries to get a working bundle and that somebody else told you that the first two were broken so you had to change the build number. If something changes in Gramps code then it really deserves a new tag and therefor a release number, e.g. v6.0.0-beta1a or -beta2. |
For a full release version,
This is what happens for the filename. Instead of |
To create GrampsAIO-6.0.0-beta1-2 I created a branch off the v6.0.0-beta1 release tag called aio-6.0.0-beta1. It contains the single commit ba2c71f which changes the AIO build script to use cx-Freeze 3.8 (3.9 contained a bug). When 3.10 was released, I created GrampsAIO-6.0.0-beta1-3 from the original aio-6.0.0-beta1 release tag again. The problem was that the About dialog didn't distinguish between the three releases. Perhaps the build number would be better described as an AIO release number. |
I think that this is good enough for me to use for the next beta release. |
With Paul finding time for Gramps again, can the loss of the AIO pinning "Gramps Console" and GrampsW app Icons to the Start Menu be reviewed? 6.0beta1 is not adding the icons. You have to search after installing and Pin them to the Start menu (and Taskbar, but that's less frustrating.) |
Add a build-number input to the AIO workflow
When DEV_VERSION is not True, set the appbuild to the build-number input