1
0
mirror of https://github.com/gluster/glusterd2.git synced 2026-02-05 12:45:38 +01:00
Files
glusterd2/scripts/gen-version.sh
Kaushal M 3e314e1a93 make dist/dist-vendor targets and other make changes
make dist creates source tarballs of the GD2 source directory.
make dist-vendor creates tarballs including the vendor directory.

The generated tarballs contain a VERSION file, which is used by the
build script to set proper versions, gitsha and build-ids when building
GD2 from tarballs.
2017-11-07 18:21:41 +05:30

15 lines
378 B
Bash
Executable File

#!/bin/bash
# This scripts generates a VERSION file to be included in the dist tarball
# The generated VERSION file is imported and used by the build script
PKG_VERSION=$(git describe --tags --match "v[0-9]*")
GIT_SHA=$(git rev-parse --short HEAD)
GIT_SHA_FULL=$(git rev-parse HEAD)
cat >VERSION <<EOF
PKG_VERSION=$PKG_VERSION
GIT_SHA=$GIT_SHA
GIT_SHA_FULL=$GIT_SHA_FULL
EOF