include VERSION details when using gl-system-install from a clone
It works fine when you're installing off of a tar file because the Makefile also generates a VERSION file, but when doing from a clone you still need to generate it. (plus minor fix to easy install, in the same area of code)
This commit is contained in:
parent
ce2e8b6788
commit
b4c1627130
|
@ -215,7 +215,7 @@ version_info() {
|
||||||
# MANUAL: if needed, make a note of the version you are upgrading from, and to
|
# MANUAL: if needed, make a note of the version you are upgrading from, and to
|
||||||
|
|
||||||
# record which version is being sent across; we assume it's HEAD
|
# record which version is being sent across; we assume it's HEAD
|
||||||
if git rev-parse --is-inside-work-tree 2>/dev/null
|
if git rev-parse --is-inside-work-tree >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
git describe --tags --long HEAD 2>/dev/null > conf/VERSION || echo '(unknown)' > conf/VERSION
|
git describe --tags --long HEAD 2>/dev/null > conf/VERSION || echo '(unknown)' > conf/VERSION
|
||||||
else
|
else
|
||||||
|
|
|
@ -34,6 +34,14 @@ cp src/* $gl_bin_dir || die "cp src/* to $gl_bin_dir failed"
|
||||||
rm $gl_bin_dir/gl-easy-install
|
rm $gl_bin_dir/gl-easy-install
|
||||||
perl -lpi -e "s(^GL_PACKAGE_CONF=.*)(GL_PACKAGE_CONF=$gl_conf_dir)" $gl_bin_dir/gl-setup
|
perl -lpi -e "s(^GL_PACKAGE_CONF=.*)(GL_PACKAGE_CONF=$gl_conf_dir)" $gl_bin_dir/gl-setup
|
||||||
|
|
||||||
|
# record which version is being sent across; we assume it's HEAD
|
||||||
|
if git rev-parse --is-inside-work-tree >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
git describe --tags --long HEAD 2>/dev/null > conf/VERSION || die "git describe failed -- this should not happen!"
|
||||||
|
else
|
||||||
|
[[ -f conf/VERSION ]] || echo '(unknown)' > conf/VERSION
|
||||||
|
fi
|
||||||
|
|
||||||
cp -R conf/* $gl_conf_dir || die "cp conf/* to $gl_conf_dir failed"
|
cp -R conf/* $gl_conf_dir || die "cp conf/* to $gl_conf_dir failed"
|
||||||
perl -lpi \
|
perl -lpi \
|
||||||
-e "s(^#\s*\\\$GL_PACKAGE_CONF\s*=.*)(\\\$GL_PACKAGE_CONF = '$gl_conf_dir';)" \
|
-e "s(^#\s*\\\$GL_PACKAGE_CONF\s*=.*)(\\\$GL_PACKAGE_CONF = '$gl_conf_dir';)" \
|
||||||
|
|
Loading…
Reference in a new issue