capistrano-scm-gitcopy 0.0.6 → 0.0.7
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 +4 -4
- data/capistrano-scm-gitcopy.gemspec +2 -2
- data/lib/capistrano/tasks/gitcopy.rake +6 -5
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60238a0237ac573788ca198840171ba56fe9930a
|
4
|
+
data.tar.gz: c30a9ac6958e0b9fca76a75b8b8fe5bc9e2ec905
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c2d3d55ad85710df81504c9a75773ce4ef55f343f281e6a2d1cf5757433543840ce25128a1fc5850bde98e7f6af87448de9e4bda70c5b6ce682eff9664f7eea
|
7
|
+
data.tar.gz: 648b8edd8cec7e6cbd8a8d2784e7ab83752e706f7fc300f492d482b4247974b0fa27801dfb8c11beb7aa206acb2a4db5e69b85aa60033f7c832f842cd5b2e729
|
@@ -3,9 +3,9 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "capistrano-scm-gitcopy"
|
6
|
-
s.version = "0.0.
|
6
|
+
s.version = "0.0.7"
|
7
7
|
s.licenses = ["MIT"]
|
8
|
-
s.authors = ["Jack Wu"]
|
8
|
+
s.authors = ["Jack Wu", "Carl Douglas"]
|
9
9
|
s.email = ["xuwupeng2000@gmail.com"]
|
10
10
|
s.homepage = "https://github.com/xuwupeng2000/capsitrano-scm-gitcopy.git"
|
11
11
|
s.summary = %q{Gitcopy strategy for capistrano 3.x}
|
@@ -2,13 +2,14 @@ namespace :gitcopy do
|
|
2
2
|
|
3
3
|
archive_name = "archive.#{ DateTime.now.strftime('%Y%m%d%m%s') }.tar.gz"
|
4
4
|
|
5
|
-
# Deploy specific branch in the following way:
|
6
|
-
# $ cap deploy -s branch=<the branch you want to deploy>
|
7
|
-
release_branch = ENV["branch"] || "master"
|
8
|
-
|
9
5
|
desc "Archive files to #{archive_name}"
|
10
6
|
file archive_name do |file|
|
11
|
-
system "git
|
7
|
+
system "git show --quiet #{fetch(:branch)}"
|
8
|
+
if $?.exitstatus == 0
|
9
|
+
system "git archive --format=tar #{fetch(:branch)} | gzip > #{ archive_name }"
|
10
|
+
else
|
11
|
+
puts "Can't find commit for: #{fetch(:branch)}"
|
12
|
+
end
|
12
13
|
end
|
13
14
|
|
14
15
|
desc "Deploy #{archive_name} to release_path"
|
metadata
CHANGED