Bug 691823 - make bkradd will not pickup latest tag if using git
Summary: make bkradd will not pickup latest tag if using git
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 0.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: future_maint
Assignee: Bill Peck
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-29 14:56 UTC by Bill Peck
Modified: 2011-05-19 16:15 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 16:15:04 UTC


Attachments (Terms of Use)

Description Bill Peck 2011-03-29 14:56:17 UTC
Description of problem:

Vladimir remember me discussion about rht-mk-get-current-tag.

This problem is pretty the same as mentioned. Issue appears when more than one tag are in the same day. See line 44 in rht-mk-get-current-tag.

CURRENT_TAG=$(git for-each-ref --count=1 --sort=-committerdate --format="%(refname)" "refs/tags/${PACKAGE_NAME}*" | cut -c 11-)"

This line always return the first tag in day.

Temporary solution is simple replace line 44 for:
CURRENT_TAG=$(git tag -l | grep -E "${PACKAGE_NAME}-([0-9_\-]+)" | sort -V |tail -n1)

Kudos to Vlad.

On 03/29/2011 11:17 AM, Tomas Pelka wrote:
> Hi folks,
>
> I've updated my beakerlib (to 1.3-6) yesterday and meet several problems. Seems that "make bkradd" is comparing the current tag created by "make tag" with the latest tag in out git repo.
>
> You need to run "git push --tags" first and "make brkadd" afterwards.
>
> Cheers

Comment 1 Bill Peck 2011-03-29 14:58:12 UTC
pushed to gerrit for review

Comment 2 Bill Peck 2011-04-04 18:04:16 UTC
sort -V doesn't work in RHEL5.

Comment 3 Bill Peck 2011-05-19 16:15:04 UTC
this has been solved.


Note You need to log in before you can comment on or make changes to this bug.