append branch to version string
Bug #700193 reported by
KaiMartin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pcb |
Fix Released
|
Low
|
Bert Timmerman |
Bug Description
Automatically add a note to the version string that says which branch/
This is a deliberate almost-duplicate of #699681. Unlike that bug, this one refers to pcb rather than gschem.
---<)kaimartin(>---
tags: | added: build-system |
Changed in geda-project: | |
importance: | Undecided → Wishlist |
Changed in pcb: | |
milestone: | none → pcb-4.0.1 |
assignee: | nobody → Bert Timmerman (bert-timmerman) |
importance: | Wishlist → Low |
status: | New → In Progress |
Changed in pcb: | |
milestone: | pcb-4.1.0 → pcb-4.0.1 |
Changed in pcb: | |
status: | Fix Committed → Fix Released |
Changed in geda-project: | |
status: | New → Fix Released |
To post a comment you must log in.
The attached patch adds an extra string to the version string if built from a git source repository.
Since a branch in git does not really tell anything without extra information (i.e. to what commit did the branch point at the moment, is it a local only branch etc), this patch uses `git describe` which will output an annotated tag if found (which will only happen on release branches with current strategy), or (on branches without annotated tags) will output an abbreviated commit hash.
Example version string (on branch with this patch):
$ ./src/pcb --version
PCB version 1.99z-079c0d2
$ git log --oneline -n 3
079c0d2 Add git commit hash to version if building from git sources
68d01fd action.c: clean up before return.
6e8b883 action.c: added cast to int.