genome / bam-readcount

Count bases in BAM/CRAM files
MIT License
298 stars 95 forks source link

`bam-readcount` build from release source code zip/tarball does not have a version number #96

Open apldx opened 2 years ago

apldx commented 2 years ago

If you download a release as a zip or tarball

wget https://github.com/genome/bam-readcount/archive/refs/tags/v1.0.1.tar.gz

and build it, running bam-readcount --version shows

bam-readcount version: unstable (commit nogit)

If you clone the tag for the release instead (ie, same source code)

git clone -b v1.0.1 --single-branch git@github.com:genome/bam-readcount

and build, the version is correct

bam-readcount version: 1.0.1 (commit e88e18b)

I think this is because as part of the build process,

build-common/bin/gitrev.pl

runs and tries to get the version from the Git tag list. Since the source zip/tarball do not have any Git information, it has no way to parse a version and reports nogit.