crossroads_capistrano 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "crossroads_capistrano"
|
6
|
-
s.version = "1.2.
|
6
|
+
s.version = "1.2.1"
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.authors = ["Steve Kenworthy", "Ben Tillman", "Nathan Broadbent"]
|
9
9
|
s.email = ["it_dept@crossroads.org.hk"]
|
@@ -8,8 +8,11 @@ task :revisions, :roles => :app do
|
|
8
8
|
puts "=== Previous Revision: \033[1;32m#{previous}\033[0m\n\n"
|
9
9
|
# Show difference between master and deployed revisions.
|
10
10
|
if (diff = `git log #{current}..#{latest} --oneline`) != ""
|
11
|
-
|
11
|
+
# Colorize refs
|
12
|
+
diff.gsub!(/^([a-f0-9]+) /, "\033[1;32m\\1\033[0m - ")
|
12
13
|
diff = " " << diff.gsub("\n", "\n ") << "\n"
|
14
|
+
# Indent commit messages nicely, max 80 chars per line, line has to end with space.
|
15
|
+
diff = diff.split("\n").map{|l|l.scan(/.{1,120}/).join("\n"<<" "*14).gsub(/([^ ]*)\n {14}/m,"\n"<<" "*14<<"\\1")}.join("\n")
|
13
16
|
puts "=== Difference between master revision and deployed revision:\n\n"
|
14
17
|
puts diff
|
15
18
|
end
|