Page 1 of 1

How to find version number / commits

Posted: Wednesday 04 December 2019 13:42
by waaren
For some time I have been wondering how to connect commits and/or pull requests to domoticz Version numbers but I have not found a good way to do that realtime yet. In the search to find which change caused the start of recent memory leaking, I needed to compile a number of versions and I used git to get the related commits.
I then decided to leave the bash script I created for this compiling of all recent commits running in the background to get as much information needed for future use and that resulted in a nice overview of domoticz version number, short commit ID's, dates and short commit description as now can be found on this wiki page

I intend to keep this overview up to date and hopefully some of the more knowledgeably domoticz developers can show me a less time consuming way of connecting domoticz version numbers to commits.

for forum members interested;
git is a distributed version-control system for tracking changes in source code during software development.

I used the following git commands to get this list.

Code: Select all

git clone     ==>> clones a repository into a newly created directory
git stash     ==>> record the current state of the working directory and the index and go back to a clean working directory
git checkout  ==>> navigate to a named branch
git pull      ==>> get latest changes from current branch
git log       ==>> show all commits from current branch (detailed)

git checkout development                                              ==>> navigate to the main domoticz development branch
git checkout $commit                                                  ==>> checkout a specific commit to enable compiling that specific version
git clone https://github.com/domoticz/domoticz.git beta               ==>> get a local copy of the domoticz development system in (sub) directory beta
git log --date=human --pretty=format:"%H %h - %ad : %s" | cut -b1-200 ==>> produce one liners from git log
git show <short commit ID>                                            ==>> detailed information on one commit

lastCommit=$(git rev-parse --short HEAD~0)                                          ==>> get latest commit 
lastVersion=V4.$(expr $(git  --git-dir ./.git rev-list $lastCommit --count) + 2107) ==>> calculate current version

#Howto get database versions
git log --pretty=format:"%h" > commits
while read commit; do
     echo $(git show --abbrev-commit $commit | egrep '\+#define DB_VERSION|commit' | cut -d' ' -f2-3 ); 
done < commits > commitsDB.raw
grep DB_VERSION commitsDB.raw  > commitsDB.tbl


Re: How to find version number / commits

Posted: Wednesday 04 December 2019 14:08
by FireWizard
@waaren

Hi,

This is a fantastic job.
I always wonder, what has been the changes if I do an upgrade. Searching the commits helps, but this list is what we need.

Would it be possible to link to this list,if we upgrade?
Currently the link, to what has been changed, is linking to the stable version.
I know, it is a feature request, but would be helpful.

Important however is to keep the list updated.

Keep up the good work

Regards

Re: How to find version number / commits

Posted: Wednesday 04 December 2019 19:39
by waaren
FireWizard wrote: Wednesday 04 December 2019 14:08 I always wonder, what has been the changes if I do an upgrade. Searching the commits helps, but this list is what we need.
Thanks for the compliment. I also missed the link between commits and domoticz versions.
Would it be possible to link to this list,if we upgrade? Currently the link, to what has been changed, is linking to the stable version.
I already include a pointer in the History.txt file ( which is included in the updates ) to the updated dzVents documentation when relevant. If it helps I can include a link in that file to the wiki page but I am not sure if that is what you are looking for ?
Important however is to keep the list updated.
Sure. I have automated the process as much as possible but for now a ( limited ) manual action is stil required. Having said that, the domoticz wiki can be updated by all who registered as user.

BTW. Because of the massive spam attacks on the wiki; registration must go via a PM (private mail) to me