Bug #11490
Make on_a_tag function more accurate
Start date:
2016-05-25
Due date:
% Done:
100%
Description
It currently answers “yes, sure” for any detached head, not just on a tag, which is OK for our current use case of this function, but if reused in another context it may break.
Also, this function should allow building a commit that has a tag on it: this new “building on a tag” requirement breaks builds on Jenkins while releasing, which is pretty bad since we’d love to have Jenkins’ input at this time.
Subtasks
History
#1 Updated by intrigeri 2016-05-25 22:56:07
- Description updated
#2 Updated by intrigeri 2016-05-25 23:33:38
kibi: intrigeri: this would work, I think:
# here=$(git show upstream/testing~ | awk '/^commit/ {print $2}')
# for tag in $(git tag -l); do if [ $(git show $tag|awk '/^commit / {print $2}') = $here ]; then echo found: $tag; fi; done
found: 2.4-rc1
kibi: except you don't echo, you return 0, or return 1 if nothing matched
kibi: there might be smarter ways, but that seems to work
#3 Updated by intrigeri 2016-05-25 23:36:37
anonym: git describe --tags --exact-match $commit_id
seems simpler.
#4 Updated by intrigeri 2016-05-25 23:49:30
And the current git describe --tags --exact-match $(git rev-parse --verify HEAD) >/dev/null 2>/dev/null
seems to be working fine.
#5 Updated by intrigeri 2016-05-25 23:59:13
- Status changed from Confirmed to In Progress
- Target version changed from Tails_2.6 to Tails_2.5
- % Done changed from 0 to 50
- QA Check set to Ready for QA
- Feature Branch set to https://mraw.org/git/?p=tails.git;a=commit;h=beb3af631709fc6751929a869a98a23665db7148
#6 Updated by intrigeri 2016-06-01 11:46:38
- Status changed from In Progress to Fix committed
- Assignee deleted (
intrigeri) - Target version changed from Tails_2.5 to Tails_2.4
- % Done changed from 50 to 100
- QA Check changed from Ready for QA to Pass
Merged, thanks! … with a typo fix on top (commit:404165b).
#7 Updated by anonym 2016-06-08 01:28:06
- Status changed from Fix committed to Resolved