Opened 4 years ago

Closed 2 years ago

#419 closed defect (fixed)

Move GIT revision number to build script

Reported by: krzywon Owned by: wojciech
Priority: minor Milestone: SasView 4.1.0
Component: SasView Keywords:
Cc: Work Package: SasView Framework Enhancements

Description

The command to fetch the GIT revision number must be put into the build script for all builds. I will send the appropriate information to Torben to be changed for the next revision.

Change History (14)

comment:1 Changed 3 years ago by butler

  • Work Package changed from SasView Bug Fixing to SasView Framework Enhancements

comment:2 Changed 3 years ago by butler

  • Milestone changed from SasView Next Release +1 to SasView 4.0.0

comment:3 Changed 3 years ago by ajj

  • Owner set to trnielsen
  • Status changed from new to assigned

Was the info sent to Torben?

comment:4 Changed 3 years ago by butler

  • Priority changed from minor to critical

Jeff should work with Torben on this as necessary — I think he had it working locally but needed to make the change on the build machine as I recall. Also in spirit of disciplined and professional it really is time to get this done so moving it to critical list (can't call it blocker as is not really part of original core tasks we set out for this release).

comment:5 Changed 3 years ago by krzywon

http://stackoverflow.com/questions/5581722/how-can-i-rewrite-python-version-with-git

Here is a quick overview of how to do this during the build.

comment:6 Changed 2 years ago by butler

Note that we need to use

git describe --tags

as the last annotated tag was version 3.0.0 which will make the version number look wrong. Of course that means we should be annotating our release tags with a -a option on the tag. However we should also not assume that all future tags will be properly annotated and the —tags option is most appropriate anyway.

comment:7 Changed 2 years ago by trnielsen

Git hash is now included in /sasview/sasview/init.py

python run.py will extract the git hash

The build scripts have been updated to include the git hash for the installers.

The git hash is the long version:
1a4f4dfac4cb395a4914a38f91d3cec3aa491ab1

The git describe —tags is not implemented:
v4.0-alpha2-30-g1a4f4df

On Mac OS git hash is only to be seen on splash screen. The "about" is missing from the help menu.

comment:8 Changed 2 years ago by trnielsen

Currently we only include git revision for sasview.

But sasview also depends upon

sasmodels
bumps
tinycc

So fra git hash for sasmodels, bumps, and tiny is not included.

Last edited 2 years ago by trnielsen (previous) (diff)

comment:9 Changed 2 years ago by butler

  • Milestone changed from SasView 4.0.0 to SasView Next Release +1
  • Priority changed from critical to minor

I think it would be useful to use

git describe -- tags

to pull the version number from - this command should pull the latest tagged version whether or not it was "annotated"

The current implementation is what was originally proposed and amply sufficient to understand which exact build version has the bug being reported so moving this to minor and next (+1) release.

comment:10 Changed 2 years ago by butler

  • Milestone changed from SasView Next Release +1 to SasView 4.0.0

Since we have now come around to using the original —tags We should either finish by automating the version number or decide that is not a good idea after all. Either way this ticket can then be closed.

comment:11 Changed 2 years ago by butler

  • Owner changed from trnielsen to wojciech

comment:12 Changed 2 years ago by butler

  • Milestone changed from SasView 4.0.0 to SasView 4.1.0

comment:13 Changed 2 years ago by wojciech

This has been solved by the commit: a3f1c11e89e334f2707e2834709485c8107d1e72

comment:14 Changed 2 years ago by wojciech

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.