bricks-deploy 0.6.4 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fbec173683f9a8dafac5d761da3fd639c1dc626
|
4
|
+
data.tar.gz: bd52127667f3a08172df22647c4d8114178e99a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e53137bbfd83d44e8b8846ee6611a5581c0ca82ff9855b2ad1960f2c4df573a1f5f5d94b358ee6e6ac933daa13a55a1405a685c246ef94772fdca6f2fbe4671b
|
7
|
+
data.tar.gz: 00ffb6c470461591dd6153a010806ca4d64b4106b66915262820bada9e9ff3dde0c4087dbc81d26c87fa699014c01c93568f8f52e3d3ebca57bde2ee6a154939
|
@@ -16,7 +16,8 @@ class BricksDeploy::Generator < Thor::Group
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def copy_restart_callbacks
|
19
|
-
copy_hook 'before_restart.
|
19
|
+
copy_hook 'before_restart.sh' 'bin/deploy/remote/before_restart'
|
20
|
+
copy_hook 'after_restart.sh', 'bin/deploy/remote/after_restart'
|
20
21
|
end
|
21
22
|
|
22
23
|
private
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bricks-deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mislav Marohnić
|
@@ -69,7 +69,8 @@ files:
|
|
69
69
|
- lib/bricks_deploy/generator.rb
|
70
70
|
- lib/bricks_deploy/ssh_methods.rb
|
71
71
|
- lib/bricks_deploy/templates/after_push.sh
|
72
|
-
- lib/bricks_deploy/templates/
|
72
|
+
- lib/bricks_deploy/templates/after_restart.sh
|
73
|
+
- lib/bricks_deploy/templates/before_restart.sh
|
73
74
|
- lib/bricks_deploy/templates/restart.sh
|
74
75
|
- lib/hooks/post-receive.sh
|
75
76
|
- spec/configuration_spec.rb
|
@@ -1,39 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
oldrev, newrev = ARGV
|
3
|
-
|
4
|
-
def run(cmd)
|
5
|
-
exit($?.exitstatus) unless system "umask 002 && #{cmd}"
|
6
|
-
end
|
7
|
-
|
8
|
-
RAILS_ENV = ENV['RAILS_ENV'] || 'production'
|
9
|
-
use_bundler = File.file? 'Gemfile'
|
10
|
-
rake_cmd = use_bundler ? 'bundle exec rake' : 'rake'
|
11
|
-
|
12
|
-
if use_bundler
|
13
|
-
bundler_args = ['--deployment']
|
14
|
-
BUNDLE_WITHOUT = ENV['BUNDLE_WITHOUT'] || 'development:test'
|
15
|
-
bundler_args << '--without' << BUNDLE_WITHOUT unless BUNDLE_WITHOUT.empty?
|
16
|
-
|
17
|
-
# update gem bundle
|
18
|
-
run "bundle install #{bundler_args.join(' ')}"
|
19
|
-
end
|
20
|
-
|
21
|
-
if File.file? 'Rakefile'
|
22
|
-
tasks = []
|
23
|
-
|
24
|
-
num_migrations = `git diff #{oldrev} #{newrev} --diff-filter=A --name-only -z -- db/migrate`.split("\0").size
|
25
|
-
# run migrations if new ones have been added
|
26
|
-
tasks << "db:migrate" if num_migrations > 0
|
27
|
-
|
28
|
-
# precompile assets
|
29
|
-
changed_assets = `git diff #{oldrev} #{newrev} --name-only -z -- app/assets`.split("\0")
|
30
|
-
tasks << "assets:precompile" if changed_assets.size > 0
|
31
|
-
|
32
|
-
run "#{rake_cmd} #{tasks.join(' ')} RAILS_ENV=#{RAILS_ENV}" if tasks.any?
|
33
|
-
end
|
34
|
-
|
35
|
-
# clear cached assets (unversioned/ignored files)
|
36
|
-
run "git clean -x -f -- public/stylesheets public/javascripts"
|
37
|
-
|
38
|
-
# clean unversioned files from vendor/plugins (e.g. old submodules)
|
39
|
-
run "git clean -d -f -- vendor/plugins"
|