*Engineering notebook post about "Harmonize Leo and Pip version numbers 
#1242 <https://github.com/leo-editor/leo-editor/issues/1242>". Much of this 
opening post to mailing list is copied from the issue description. I 
realized it's better to have the "thinking out loud" parts in the mailing 
list, where people can chime in more easily, *

Leo's self reported and Pip's reported version numbers should agree with 
each other and they don't. A chicken and egg problem. Part of this is 
because pip doesn't have (guaranteed) access to Git.


> leo-m --version

Leo 6.0-b2-devel, devel branch, build cecd3edb41
2019-07-24 17:40:09 -0500

> pip show leo
Name: leo
Version: 6.0b1.dev103


Notes: 


   - leo-m --version returns *version* var from leoversion.py (a static 
   string), plus some other info if available: 
      - branch (from *g.gitBranchName()* ?)
      - built from leoGlobals.py *g.getGitVersion()*, which is parsed from git 
      log -n 1
   - setup.py (and thus pip) version is built from *g.gitDescribe()*, which 
   is parsed from git describe.


$ leo-m --version

Leo 6.0-b2-devel, devel branch, build 72128bce61
2019-07-24 11:00:48 -0500

$ git log -n 1 --date=iso
commit 72128bce61ed79d453a161d89d78fb86d3b56d20 (HEAD -> devel, origin/devel)
Author: Edward K. Ream <[email protected]>
Date:   2019-07-24 11:00:48 -0500

    Fixed #1257 and removed disabled code

$  git describe --long --tags
v6.0b1-110-g72128bce6


*Mismatches:*


Git describe returns different version tag from the static version in 
leoversion.py. Why?
...because the workflow is:

   1. update static to v6.0-b1 (a master branch release) [b1d9a0e 
   
<https://github.com/leo-editor/leo-editor/commit/b1d9a0ec07d4699e94dafa3922b78c7c07d337f1>
   ]
   2. create git tag for that v: v6.0-b1-rel [445dfa1 
   
<https://github.com/leo-editor/leo-editor/commit/445dfa149e71a5714714422c9f21c58698218375>
   ]
   3. Initiate development: update static to v6.0-b2-devel to reflect that 
*"we're 
   now working on the next version"* [84afef0 
   
<https://github.com/leo-editor/leo-editor/commit/84afef0b91418ff4ade3240620454ddabc3168b5>
   ]

Leo self reports version from "3. Initiate dev". Git reports from it's tag 
log, which doesn't know about step 3. Put another way, Leo is forward 
looking and git is backward looking.

So is all that's needed is to add:

   1. create git tag for v6.0-b2-dev in devel branch?

I'm not sure it fits, because of the backward looking nature. ...still 
thinking...

[many git-reading hours later]: yes, I think this is a good idea. At the 
cost of adding yet-another-step for the human in the Creating a Release 
workflow.


-matt

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/18530b23-ebe0-4117-87f2-b57daa724283%40googlegroups.com.

Reply via email to