diff options
author | Daniel Hahler <git@thequod.de> | 2019-10-10 10:38:15 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-10-10 01:38:15 -0700 |
commit | 6768c43e2129af85923ed0b4ed9f6f47be42b4fb (patch) | |
tree | 3b6b708a407df127f742e7e48292012e94c70f22 | |
parent | 51f2826f617532aaf5d682dfc3229f3723427ce6 (diff) | |
download | rneovim-6768c43e2129af85923ed0b4ed9f6f47be42b4fb.tar.gz rneovim-6768c43e2129af85923ed0b4ed9f6f47be42b4fb.tar.bz2 rneovim-6768c43e2129af85923ed0b4ed9f6f47be42b4fb.zip |
update_version_stamp: redirect stderr on first try, --first-parent #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.
-rwxr-xr-x | scripts/update_version_stamp.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/update_version_stamp.lua b/scripts/update_version_stamp.lua index 509e1f6fad..394c4f7694 100755 --- a/scripts/update_version_stamp.lua +++ b/scripts/update_version_stamp.lua @@ -20,9 +20,9 @@ end local versiondeffile = arg[1] local prefix = arg[2] -local described = io.popen('git describe --dirty'):read('*l') +local described = io.popen('git describe --first-parent --dirty 2>/dev/null'):read('*l') if not described then - described = io.popen('git describe --tags --always --dirty'):read('*l') + described = io.popen('git describe --first-parent --tags --always --dirty'):read('*l') end if not described then io.open(versiondeffile, 'w'):write('\n') |