[DRE-commits] [diaspora] 03/03: precompile assets, remove sudo

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Mon Sep 26 10:04:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository diaspora.

commit 3855df6f25b02e314b568265dd8a65841ca7f845
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Mon Sep 26 15:00:19 2016 +0530

    precompile assets, remove sudo
---
 debian/postinst | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/debian/postinst b/debian/postinst
index 4a4c138..5f90e3c 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -38,11 +38,14 @@ case "$1" in
 	echo RAILS_ENV=$RAILS_ENV DB=$DB ENVIRONMENT_URL=$ENVIRONMENT_URL
 	
 	echo "Verifying we have all required libraries..."
-	sudo -u diaspora -E bundle install --local
+	su diaspora -s /bin/sh -c 'bundle install --local'
 	
 	echo "Setting up secret_token..."
         DB=$DB RAILS_ENV=$RAILS_ENV DISABLE_SPRING=1 bundle exec rake generate:secret_token 
         
+	echo "Precompiling assets..."
+	su diaspora -s /bin/sh -c 'bundle exec rake tmp:cache:clear assets:precompile'
+
 	echo "Running final rake tasks..."
 	. /usr/lib/diaspora-common/scripts/rake-tasks.sh
    ;;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/diaspora.git



More information about the Pkg-ruby-extras-commits mailing list