Closed orgads closed 1 year ago
is there any reason for the check of .git existing anyways? Why can't we just go with whether the git describe command returns something?
There is no reason to run or to even have git in docker build. And certainly you shouldn't copy the .git
directory, so git describe will fail anyway.
My question is, couldn't we just go with this
MYVERSION=$(git describe --always || echo 1.0.0)
?
Yes, this can be done.
This should work if you build in $srcdir/build, but it will fail if you build outside the source directory (e.g. $srcdir/../drachtio-build).