diff options
| author | Robert | 2018-01-08 14:01:13 +0100 |
|---|---|---|
| committer | Robert | 2018-01-08 14:01:13 +0100 |
| commit | 6123fa3580b0048f39157c35cecef3c914e06b4c (patch) | |
| tree | 15939baa35d07581bc2adf0804da7fcd5905ec46 /lib | |
| parent | dcc56c4d02f9f71b13dd38251367306842cd10c7 (diff) | |
| parent | 2ea51b513170b1b6578b47ca10b995e07ee11fef (diff) | |
| download | chouette-core-6123fa3580b0048f39157c35cecef3c914e06b4c.tar.bz2 | |
Merge branch 'master' of github.com:af83/stif-boiv
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/tasks/install.rake | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/tasks/install.rake b/lib/tasks/install.rake index ccc6f2450..1150825b2 100644 --- a/lib/tasks/install.rake +++ b/lib/tasks/install.rake @@ -11,6 +11,7 @@ task :package do sh "bundle exec rake assets:precompile RAILS_ENV=production" sh "tar -rf tmp/package/stif-boiv-release-#{release_name}.tar vendor/cache" sh "tar -rf tmp/package/stif-boiv-release-#{release_name}.tar public/assets" + sh "tar -rf tmp/package/stif-boiv-release-#{release_name}.tar public/packs" %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}" @@ -21,3 +22,26 @@ task :package do sh "tar -czf stif-boiv-#{release_name}.tar.gz -C tmp/package ." sh "rm -rf tmp/package vendor/cache" end + +desc "generate all-in-1 tar.gz package for docker" +task :pkg4docker 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 "RAILS_DB_ADAPTER=nulldb bundle exec rake assets:clobber RAILS_ENV=production" +# sh "RAILS_DB_ADAPTER=nulldb bundle exec rake assets:precompile RAILS_ENV=production" + sh "bundle exec rake assets:clobber RAILS_ENV=production" + sh "bundle exec rake assets:precompile RAILS_ENV=production" + sh "tar -rf tmp/package/stif-boiv-release-#{release_name}.tar vendor/cache" + sh "tar -rf tmp/package/stif-boiv-release-#{release_name}.tar public/assets" + sh "tar -rf tmp/package/stif-boiv-release-#{release_name}.tar public/packs" + + sh "gzip -c tmp/package/stif-boiv-release-#{release_name}.tar > tmp/stif-boiv-release.tar.gz" + + sh "rm -rf tmp/package vendor/cache" +end |
