bricks-deploy 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 09d4a4cbcab76b8e5917aeffb058da208cc2ffac
4
- data.tar.gz: 10d7779d76f93758dfed2ea1675de2973975b910
3
+ metadata.gz: 6fbec173683f9a8dafac5d761da3fd639c1dc626
4
+ data.tar.gz: bd52127667f3a08172df22647c4d8114178e99a7
5
5
  SHA512:
6
- metadata.gz: c9e4f43e6c44c5590286ae61bbe3457ae105c5a3f696f99ffdb8c9c556f5519e6e40a394cc000f99dd53b68c4de07f4096df2d3d9fe39a81406630adaefca9db
7
- data.tar.gz: 40d08c1f51b28801f226d0e4cbe8d1d547986ca280bf7db58f755111e930e8651606d3fdd4d9508364f684f406afa25a0da5a59a3db58712412600ce64f7af5f
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.rb', 'bin/deploy/remote/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
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bash
2
+
3
+ echo "after restart\n"
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ echo "before restart\n"
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
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/before_restart.rb
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"