install.sh: pick cache dir based on GITLAB_VERSION

This commit is contained in:
Sameer Naik 2015-10-23 13:45:19 +05:30
parent 256c16fea6
commit b46e105a61

View File

@ -1,7 +1,7 @@
#!/bin/bash
set -e
GEM_CACHE_DIR="${SETUP_DIR}/cache"
GEM_CACHE_DIR="${SETUP_DIR}/cache.${GITLAB_VERSION}"
# add golang1.5 ppa
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv B0B8B106A0CA2F79FBB616DBA65E2E5D742A38EE
@ -78,7 +78,7 @@ sudo -HEu ${GITLAB_USER} cp config/initializers/smtp_settings.rb.sample config/i
# install gems required by gitlab, use local cache if available
if [[ -d ${GEM_CACHE_DIR} ]]; then
mv ${GEM_CACHE_DIR} vendor/
mv ${GEM_CACHE_DIR} vendor/cache
chown -R ${GITLAB_USER}:${GITLAB_USER} vendor/cache
fi
sudo -HEu ${GITLAB_USER} bundle install -j$(nproc) --deployment --without development test aws