Skip to content

Commit 6768c43

Browse files
blueyedjustinmk
authored andcommitted
update_version_stamp: redirect stderr on first try, --first-parent neovim#11186
Avoid noise during builds: > fatal: No annotated tags can describe '417449f468c4ba186954f6295b3338fb55ee7b4a'. > However, there were unannotated tags: try --tags. This might be useful in general, but is expected to not happen - and falling back is OK then. The fallback command would still display errors then. It also uses `--first-parent`, which is important for when a release branch gets merged back.
1 parent 51f2826 commit 6768c43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/update_version_stamp.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ end
2020
local versiondeffile = arg[1]
2121
local prefix = arg[2]
2222

23-
local described = io.popen('git describe --dirty'):read('*l')
23+
local described = io.popen('git describe --first-parent --dirty 2>/dev/null'):read('*l')
2424
if not described then
25-
described = io.popen('git describe --tags --always --dirty'):read('*l')
25+
described = io.popen('git describe --first-parent --tags --always --dirty'):read('*l')
2626
end
2727
if not described then
2828
io.open(versiondeffile, 'w'):write('\n')

0 commit comments

Comments
 (0)