deploy_tracking 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/deploy_tracking.rb +8 -4
  2. metadata +3 -3
@@ -4,22 +4,26 @@ configuration.load do
4
4
  namespace :deploy_tracking do
5
5
  desc "Add a new line to the Deploylog"
6
6
  task :log do
7
- me = "#{`whoami`.chomp}@#{`uname -n`.chomp}"
8
7
  current_stage = fetch(:stage, 'production')
8
+ deploy_file = fetch(:deploy_file, "Deploylog")
9
9
  git_info = `git log --oneline #{branch}|head -n 1`.chomp
10
10
 
11
- File.open('Deploylog', 'a+') do |f|
11
+ File.open(deploy_file, 'a+') do |f|
12
12
  f.puts "[#{release_name}] Deployed to #{current_stage} by #{me.ljust(10)} - #{branch}:#{git_info}"
13
13
  end
14
14
 
15
- `git add Deploylog && git commit -m "Updating deploylog for deploy #{release_name}" Deploylog`
15
+ `git add #{deploy_file} && git commit -m "Updating deploylog for deploy #{release_name}" #{deploy_file}`
16
16
  end
17
17
 
18
18
  task :mark do
19
- put "Deployed by #{`whoami`.chomp}@#{`uname -n`.chomp}", "#{latest_release}/deployed_by"
19
+ put "Deployed by #{me}", "#{latest_release}/deployed_by"
20
20
  end
21
21
  end
22
22
 
23
23
  before "deploy", "deploy_tracking:log"
24
24
  before "deploy:finalize_update", "deploy_tracking:mark"
25
+ end
26
+
27
+ def me
28
+ "#{`whoami`.chomp}@#{`uname -n`.chomp}"
25
29
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deploy_tracking
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 3
10
- version: 0.3.3
9
+ - 4
10
+ version: 0.3.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jan De Poorter - Openminds