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'