From 4a140fc5fd61891976cddef8f6ce4fe13d1906e1 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Mon, 7 Aug 2017 18:19:58 +0000 Subject: [PATCH] community/gitlab to 9.4.3-2 --- community/gitlab/PKGBUILD | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/community/gitlab/PKGBUILD b/community/gitlab/PKGBUILD index 24e9c7a7f..df5f0158c 100644 --- a/community/gitlab/PKGBUILD +++ b/community/gitlab/PKGBUILD @@ -12,7 +12,7 @@ pkgname=gitlab pkgver=9.4.3 -pkgrel=1 +pkgrel=2 pkgdesc="Project management and code hosting application" arch=('x86_64') url="https://gitlab.com/gitlab-org/gitlab-ce/tree/master#README" @@ -70,7 +70,16 @@ _logdir="/var/log/${pkgname}" _srcdir="gitlab-ce-v${pkgver}" prepare() { - cd "${srcdir}/${_srcdir}"* + cd "${srcdir}" + + # Get first 7 characters from sha1 which has 40 characters in total + local revision=$(ls -d ${_srcdir}* | rev | cut -c 34-40 | rev) + + cd "${_srcdir}"* + + msg2 "Patching git revision in config/initializers/2_app.rb..." + sed -i -e "s|REVISION = Gitlab::Popen.popen(%W(#{config.git.bin_path} log --pretty=format:%h -n 1)).first.chomp.freeze|REVISION = \"${revision}\"|" \ + config/initializers/2_app.rb export SKIP_STORAGE_VALIDATION='true'