You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two tags of interest, 1.10.109 and 1.10.110. Pulling the timestamps for the associated commits:
The timestamps for the tags themselves:
Clearly, 1.10.110 was created at a later time than 1.10.109. However, this is what get-previous-tag returns:
Interestingly, the timestamp "1662046975" corresponds to the commit time shown in the first image:
In the code:
"rev-list" "lists commit objects in reverse chronological order" (per the git-rev-list manpage). So the revision that is being returned isn't the revision associated with the latest tag, it's the revision representing the latest commit.
A more accurate command to actually return the lastest tag might be:
where the last returned value is, in fact, the latest tag:
The text was updated successfully, but these errors were encountered:
bakoontz2
changed the title
Action pulls latest commit associated with tag, not the latest tag
Action pulls tag associated with latest commit, not the latest tag
Sep 5, 2022
No worries, it's normally useful for easier debugging. But you've made an outstanding case with examples all the way down. The code changes in the PR look good, but for some reason don't output a commit. Will see how they can be updated to fail when that is missing.
(Sorry, the workflow is not accessible publicly)
Two tags of interest, 1.10.109 and 1.10.110. Pulling the timestamps for the associated commits:
The timestamps for the tags themselves:
Clearly, 1.10.110 was created at a later time than 1.10.109. However, this is what get-previous-tag returns:
Interestingly, the timestamp "1662046975" corresponds to the commit time shown in the first image:
In the code:
"rev-list" "lists commit objects in reverse chronological order" (per the git-rev-list manpage). So the revision that is being returned isn't the revision associated with the latest tag, it's the revision representing the latest commit.
A more accurate command to actually return the lastest tag might be:
git for-each-ref --sort=-taggerdate --format="%(refname:short) | %(taggerdate)" "refs/tags/*"
where the last returned value is, in fact, the latest tag:
The text was updated successfully, but these errors were encountered: