summaryrefslogtreecommitdiffstats
path: root/.gitignore
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2017-06-30 13:24:01 +0200
committerNiels de Vos <ndevos@redhat.com>2017-09-19 12:15:30 +0000
commite5c78e1a42fc7988cdbadb52208655d46f41d314 (patch)
treeda865735a76035fc7b74d89bda13bae0c7ab8b02 /.gitignore
parentffebf6c2c5ba0e369204d99a41cb250cacd8b591 (diff)
build: do not require 'git' to find the version
While looking into packaging gluster-block for Fedora, I noticed that 'git' is used to determine the version. The downloads from GitHub are not archives that have been created with 'make dist', and hence ./autogen.sh is still needed to be run. ./autogen.sh generates all the needed bits, including the ./configure script that tries to figure out the version. If ./configure runs in a non-git directory, no version can be found. In order to solve this, I'm adding a VERSION file in the root of the project. If this file exists, it is used to fetch the version, instead of trying to run git. The basic usage for RPM packaging in distributions can then be: echo %{version} > VERSION ./autogen.sh %configure Note that the VERSION file is not needed for building from a git repository. However, this file can get packaged in the 'make dist' tarball so that building from the tarball does not require git. Change-Id: Ied378c7071ee4a108a1e946dccbb7f223b7aeb9f Updates: #25 Signed-off-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to '.gitignore')
-rw-r--r--.gitignore1
1 files changed, 1 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index dcd88ca..e22154b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,7 @@ stamp-h1
*.spec
gluster-blockd.service
*.tar.gz
+VERSION
cscope.*
tags