[ARVADOS-DEV] created: 5cc977da78b718596faa9ad0352b7c14402f90fa
git at public.curoverse.com
git at public.curoverse.com
Tue Jan 19 15:19:15 EST 2016
at 5cc977da78b718596faa9ad0352b7c14402f90fa (commit)
commit 5cc977da78b718596faa9ad0352b7c14402f90fa
Author: Nico Cesar <nico at curoverse.com>
Date: Tue Jan 19 15:17:22 2016 -0500
added git_internal_dir init in postinst.sh
diff --git a/jenkins/rails-package-scripts/postinst.sh b/jenkins/rails-package-scripts/postinst.sh
index 1032d14..dfc58c5 100644
--- a/jenkins/rails-package-scripts/postinst.sh
+++ b/jenkins/rails-package-scripts/postinst.sh
@@ -220,6 +220,23 @@ configure_version() {
$COMMAND_PREFIX bundle exec rake config:check || APPLICATION_READY=0
fi
+ # initialize git_internal_dir
+ # usually /var/lib/arvados/internal.git (set in application.default.yml )
+ if [ "$APPLICATION_READY" = "1" ]; then
+ GIT_INTERNAL_DIR=$($COMMAND_PREFIX bundle exec rake config:check 2>&1 | grep git_internal_dir | awk '{ print $2 }')
+ if [ -e "$GIT_INTERNAL_DIR" ]
+ then
+ run_and_report "Creating and initializing git_internal_dir '$GIT_INTERNAL_DIR'" \
+ mkdir -p "$GIT_INTERNAL_DIR" && \
+ chown "$WWW_OWNER:" "$GIT_INTERNAL_DIR" && \
+ su -c "git init --bare $GIT_INTERNAL_DIR" "$WWW_OWNER:"
+ fi
+ run_and_report "Making sure '$GIT_INTERNAL_DIR' has the right permission" \
+ chown -R "$WWW_OWNER:" "$GIT_INTERNAL_DIR"
+ else
+ echo "Initializing git_internal_dir... skipped."
+ fi
+
# precompile assets; thankfully this does not take long
if [ "$APPLICATION_READY" = "1" ]; then
run_and_report "Precompiling assets" \
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list