drachtio / drachtio-server

A SIP call processing server that can be controlled via nodejs applications
https://drachtio.org
MIT License
237 stars 92 forks source link

Makefile: Fix git detection when building in a subdir #299

Closed orgads closed 1 year ago

orgads commented 1 year ago

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).

davehorton commented 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?

orgads commented 1 year ago

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.

davehorton commented 1 year ago

My question is, couldn't we just go with this

MYVERSION=$(git describe --always || echo 1.0.0)

?

orgads commented 1 year ago

Yes, this can be done.