[DRE-commits] [diaspora-installer] 13/55: clone diaspora and bundle install to vendor/bundle

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Mon Dec 8 12:41:23 UTC 2014


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

praveen pushed a commit to branch master
in repository diaspora-installer.

commit 4767f9b5ea49839a667be0f55154732b1ec5d866
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Tue Dec 2 18:16:06 2014 +0530

    clone diaspora and bundle install to vendor/bundle
---
 debian/postinst | 45 +++++++++++----------------------------------
 1 file changed, 11 insertions(+), 34 deletions(-)

diff --git a/debian/postinst b/debian/postinst
index a0c1ac3..587eb07 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -42,56 +42,33 @@ case "$1" in
 	mkdir -p /var/log/diaspora-pristine
 	chown -R diasporapristine: /usr/share/diaspora-pristine
 	cd /usr/share/diaspora-pristine
-	echo "Installing gems with rubygems (their debian packages have bugs)..."
-# These gems need more work before they can be apt-get
-	if ! gem list backbone-on-rails | grep backbone-on-rails
-		then gem install backbone-on-rails
-	fi
-	
-	if ! gem list handlebars_assets | grep handlebars_assets
-		then gem install handlebars_assets
-	fi
-	
-	if ! gem list rails-timeago | grep rails-timeago
-		then gem install rails-timeago
-	fi
+	echo "Cloning diaspora..."
+	sudo -u diasporapristine git clone -b master git://github.com/diaspora/diaspora.git .
+	echo "Installing gems with rubygems ..."
 	
-	if ! gem list foreman | grep foreman
-		then gem install -v=0.62.0 foreman
-	fi
-
-	if ! gem list ^devise$ | grep devise
-		then gem install -v=3.4.1 devise
-	fi
-	
-	if ! gem list rails-assets-jquery-idletimer | grep rails-assets-jquery-idletimer
-		then gem install --source https://rails-assets.org rails-assets-jquery-idletimer
-	fi
-	if ! grep RAILS_ENV /etc/diaspora.conf
-		then echo export RAILS_ENV=production >> /etc/diaspora.conf
+	if ! grep RAILS_ENV /etc/diaspora-pristine.conf
+		then echo export RAILS_ENV=production >> /etc/diaspora-pristine.conf
 	fi
 
-	if ! grep DB /etc/diaspora.conf 
-		then echo export DB=postgres >> /etc/diaspora.conf
+	if ! grep DB /etc/diaspora-diaspora-pristine.conf 
+		then echo export DB=postgres >> /etc/diaspora-pristine.conf
 	fi
 	
 	# source diaspora variables	
-	. /etc/diaspora.conf
-	export ENVIRONMENT_URL=https://${SERVERNAME}
+	. /etc/diaspora-pristine.conf
 	echo "Verifying we have all required libraries..."
-	sudo -u diaspora -E bundle install --local
+	sudo -u diaspora -E bundle install --path vendor/bundle
 	echo "Initializing database..."
 	sudo -u diaspora -E bundle exec rake db:create db:schema:load
 	echo "Precompiling assets..."
 	sudo -u diaspora -E bundle exec rake assets:precompile
-	sudo -u diaspora  touch public/source.tar.gz
 	echo "Starting diaspora service..."
 	sudo -u diaspora -E -i nohup ./script/server &
-	echo "Copy $SERVERNAME-bundle.pem and $SERVERNAME.key to /etc/diaspora/ssl"
+	echo "Copy $SERVERNAME-bundle.pem and $SERVERNAME.key to /etc/diaspora-pristine/ssl"
 	echo "And reload nginx, run # /etc/init.d  nginx reload"
 	echo "visit your pod at $ENVIRONMENT_URL"
 	echo "To stop diaspora, run # killall -9 unicorn_rails foreman sidekiq"
-	echo "To see the service status, run # tail -f /usr/share/diaspora/nohup.out"
+	echo "To see the service status, run # tail -f /usr/share/diaspora-pristine/nohup.out"
    ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

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



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