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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36b9527317a605f48ef1681cd3ed56f9d5ecabc9
4
- data.tar.gz: 3ff0bccfb0633962b07a3f2ac5c8993259bd0473
3
+ metadata.gz: 60238a0237ac573788ca198840171ba56fe9930a
4
+ data.tar.gz: c30a9ac6958e0b9fca76a75b8b8fe5bc9e2ec905
5
5
  SHA512:
6
- metadata.gz: c11c1bca85719c80270295c252dbd19b26011a10fba2ff272c25fa703325901afb912e7330f151ca1344e05a7d14e9803a342f097677a290c07b060ddd2687e3
7
- data.tar.gz: 2ab12a3f74e1577909963d245ffc63804a1de4c47330ba4633dc5b42d27595366308289d89e90c8fa7c377d062fcf64444a4ec00cc5d3fe406c16a66a7439fda
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"
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 archive #{ release_branch } --format tar | gzip > #{ archive_name }"
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
@@ -1,10 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-scm-gitcopy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Wu
8
+ - Carl Douglas
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []