dragonflyoss / Dragonfly

This repository has be archived and moved to the new repository https://github.com/dragonflyoss/Dragonfly2.
https://d7y.io
Apache License 2.0
6k stars 774 forks source link

enable abbreviated commit object as fallback #1530

Open ydcool opened 3 years ago

ydcool commented 3 years ago

enable abbreviated commit object as fallback when getting version at building

Signed-off-by: Dominic Yin yindongchao@inspur.com

Ⅰ. Describe what this PR did

In some situations there could be no tag info in repo if user did not run git fetch --tags by hand, which will leads to error on git describe --tags

Ⅱ. Does this pull request fix one issue?

NONE

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews