aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tasks/install.rake
diff options
context:
space:
mode:
authorRobert2017-06-02 16:01:57 +0200
committerRobert2017-06-02 16:01:57 +0200
commitb4193e4a246684974ecc4c40a230a07d921c737f (patch)
tree7bcf6abba3f6848bcc9f82b5a55cc14c78787db8 /lib/tasks/install.rake
parent4e791b7c834c65ee968580e0e0281eb97a7c89eb (diff)
downloadchouette-core-b4193e4a246684974ecc4c40a230a07d921c737f.tar.bz2
Merge branch 'master' of github.com:af83/stif-boiv
Diffstat (limited to 'lib/tasks/install.rake')
-rw-r--r--lib/tasks/install.rake18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/tasks/install.rake b/lib/tasks/install.rake
new file mode 100644
index 000000000..f32f3f240
--- /dev/null
+++ b/lib/tasks/install.rake
@@ -0,0 +1,18 @@
+task :package do
+ release_name = Time.now.strftime('%Y%m%d%H%M%S')
+
+ rm_rf "tmp/package"
+ mkdir_p "tmp/package"
+
+ sh "git archive --format=tar --output=tmp/package/stif-boiv-release-#{release_name}.tar HEAD"
+
+ sh "bundle package --all"
+ sh "tar -rf tmp/package/stif-boiv-release-#{release_name}.tar vendor/cache"
+
+ %w{deploy-helper.sh README sidekiq-stif-boiv.service stif-boiv.conf stif-boiv-setup.sh template-stif-boiv.sql}.each do |f|
+ cp "install/#{f}", "tmp/package/#{f}"
+ end
+
+ sh "tar -czf stif-boiv-#{release_name}.tar.gz -C tmp/package ."
+ sh "rm -rf tmp/package vendor/cache"
+end