capistrano-scm-gitcopy 0.0.5 → 0.0.6
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 +5 -13
 - data/README.md +9 -5
 - data/capistrano-scm-gitcopy.gemspec +1 -1
 - data/lib/capistrano/tasks/gitcopy.rake +4 -5
 - metadata +7 -7
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,15 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
              data.tar.gz: !binary |-
         
     | 
| 
       6 
     | 
    
         
            -
                MzRjZTkyNDBkYmNhNGZmOGFmMTEzM2Q2NDc5YTY2YTNmMDQ0NmQ4Zg==
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA1:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 36b9527317a605f48ef1681cd3ed56f9d5ecabc9
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 3ff0bccfb0633962b07a3f2ac5c8993259bd0473
         
     | 
| 
       7 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       8 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
                YmE5NzRlODMwNTlkMjYxN2I0M2ZhMzgxM2I2NDM3ODVjZmRiNDkzYWU5Yjk3
         
     | 
| 
       11 
     | 
    
         
            -
                MTUxOGQ5MzY4OGM3MDgzNDdjOTgzN2U2ZGNkOWRkYmI4NjY5YmU=
         
     | 
| 
       12 
     | 
    
         
            -
              data.tar.gz: !binary |-
         
     | 
| 
       13 
     | 
    
         
            -
                MjQ0OTU1MmNhOWVlZDU1M2MwMzdkZGY5MWJkOWZiNDA2NDYwZWRjNWJjMzdm
         
     | 
| 
       14 
     | 
    
         
            -
                OTI3ZGRjZTNlNDRiNmE2ZjRiZGIxNzhiNWU5ODkxMmFlODhmOGUyN2NlMzYw
         
     | 
| 
       15 
     | 
    
         
            -
                YjFlZTMwYjFjYWUzNWYyY2EzM2FlNmU3ZjYwMjcyOGM0ZDZhYmM=
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: c11c1bca85719c80270295c252dbd19b26011a10fba2ff272c25fa703325901afb912e7330f151ca1344e05a7d14e9803a342f097677a290c07b060ddd2687e3
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 2ab12a3f74e1577909963d245ffc63804a1de4c47330ba4633dc5b42d27595366308289d89e90c8fa7c377d062fcf64444a4ec00cc5d3fe406c16a66a7439fda
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,11 +1,13 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            capistrano-scm-gitcopy
         
     | 
| 
      
 1 
     | 
    
         
            +
            [ capistrano-scm-gitcopy ](https://github.com/xuwupeng2000/capsitrano-scm-gitcopy)
         
     | 
| 
       2 
2 
     | 
    
         
             
            ===================
         
     | 
| 
       3 
3 
     | 
    
         | 
| 
      
 4 
     | 
    
         
            +
            Capistrano 3 :copy 
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
       4 
6 
     | 
    
         
             
            A copy strategy for Capistrano 3, which mimics the `:copy` scm of Capistrano 2.
         
     | 
| 
       5 
7 
     | 
    
         
             
            This Gem is inspired by and based on https://github.com/wercker/capistrano-scm-copy.
         
     | 
| 
       6 
8 
     | 
    
         
             
            Thank wercker so much.
         
     | 
| 
       7 
9 
     | 
    
         | 
| 
       8 
     | 
    
         
            -
            This will make Capistrano tar the a specific branch, upload it to the server(s) and then extract it in the release directory.
         
     | 
| 
      
 10 
     | 
    
         
            +
            This will make Capistrano tar the a specific git branch, upload it to the server(s) and then extract it in the release directory.
         
     | 
| 
       9 
11 
     | 
    
         | 
| 
       10 
12 
     | 
    
         
             
            Requirements
         
     | 
| 
       11 
13 
     | 
    
         
             
            ============
         
     | 
| 
         @@ -32,7 +34,9 @@ Then switch the `:scm` option to `:gitcopy` in `config/deploy.rb`: 
     | 
|
| 
       32 
34 
     | 
    
         
             
                set :scm, :gitcopy
         
     | 
| 
       33 
35 
     | 
    
         | 
| 
       34 
36 
     | 
    
         | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
      
 37 
     | 
    
         
            +
            Usage
         
     | 
| 
      
 38 
     | 
    
         
            +
            ============
         
     | 
| 
       37 
39 
     | 
    
         | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
      
 40 
     | 
    
         
            +
            ```bash
         
     | 
| 
      
 41 
     | 
    
         
            +
              cap uat deploy -s branch=(your release branch)
         
     | 
| 
      
 42 
     | 
    
         
            +
              ```
         
     | 
| 
         @@ -1,8 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            namespace :gitcopy do
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
              archive_name =  "archive.#{ DateTime.now.strftime('%Y%m%d%m%s') }.tar.gz" 
         
     | 
| 
       4 
     | 
    
         
            -
              include_dir  = fetch(:include_dir) || "*"
         
     | 
| 
       5 
     | 
    
         
            -
              exclude_dir  = fetch(:exclude_dir) || ""
         
     | 
| 
       6 
4 
     | 
    
         | 
| 
       7 
5 
     | 
    
         
             
              # Deploy specific branch in the following way: 
         
     | 
| 
       8 
6 
     | 
    
         
             
              # $ cap deploy -s branch=<the branch you want to deploy>
         
     | 
| 
         @@ -10,7 +8,7 @@ namespace :gitcopy do 
     | 
|
| 
       10 
8 
     | 
    
         | 
| 
       11 
9 
     | 
    
         
             
              desc "Archive files to #{archive_name}"
         
     | 
| 
       12 
10 
     | 
    
         
             
              file archive_name do |file| 
         
     | 
| 
       13 
     | 
    
         
            -
                system "git archive #{  
     | 
| 
      
 11 
     | 
    
         
            +
                system "git archive #{ release_branch } --format tar | gzip > #{ archive_name }"
         
     | 
| 
       14 
12 
     | 
    
         
             
              end
         
     | 
| 
       15 
13 
     | 
    
         | 
| 
       16 
14 
     | 
    
         
             
              desc "Deploy #{archive_name} to release_path"
         
     | 
| 
         @@ -28,14 +26,15 @@ namespace :gitcopy do 
     | 
|
| 
       28 
26 
     | 
    
         
             
                  execute :tar, "-xzf", tmp_file, "-C", release_path
         
     | 
| 
       29 
27 
     | 
    
         
             
                  execute :rm, tmp_file
         
     | 
| 
       30 
28 
     | 
    
         
             
                end
         
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
                Rake::Task["gitcopy:clean"].invoke
         
     | 
| 
       33 
29 
     | 
    
         
             
              end
         
     | 
| 
       34 
30 
     | 
    
         | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
       35 
32 
     | 
    
         
             
              task :clean do |t|
         
     | 
| 
       36 
33 
     | 
    
         
             
                # Delete the local archive
         
     | 
| 
       37 
34 
     | 
    
         
             
                File.delete archive_name if File.exists? archive_name
         
     | 
| 
       38 
35 
     | 
    
         
             
              end
         
     | 
| 
      
 36 
     | 
    
         
            +
              after 'deploy:finished', 'gitcopy:clean'
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
       39 
38 
     | 
    
         | 
| 
       40 
39 
     | 
    
         
             
              task :create_release => :deploy
         
     | 
| 
       41 
40 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,27 +1,27 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: capistrano-scm-gitcopy
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.6
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Jack Wu
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-10-07 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: capistrano
         
     | 
| 
       15 
15 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
     | 
    
         
            -
                - - ~>
         
     | 
| 
      
 17 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
19 
     | 
    
         
             
                    version: '3.0'
         
     | 
| 
       20 
20 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       21 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       22 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       23 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       24 
     | 
    
         
            -
                - - ~>
         
     | 
| 
      
 24 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
26 
     | 
    
         
             
                    version: '3.0'
         
     | 
| 
       27 
27 
     | 
    
         
             
            description: Gitcopy strategy for capistrano 3.x
         
     | 
| 
         @@ -31,7 +31,7 @@ executables: [] 
     | 
|
| 
       31 
31 
     | 
    
         
             
            extensions: []
         
     | 
| 
       32 
32 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       33 
33 
     | 
    
         
             
            files:
         
     | 
| 
       34 
     | 
    
         
            -
            - .gitignore
         
     | 
| 
      
 34 
     | 
    
         
            +
            - ".gitignore"
         
     | 
| 
       35 
35 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       36 
36 
     | 
    
         
             
            - LICENSE
         
     | 
| 
       37 
37 
     | 
    
         
             
            - README.md
         
     | 
| 
         @@ -50,12 +50,12 @@ require_paths: 
     | 
|
| 
       50 
50 
     | 
    
         
             
            - lib
         
     | 
| 
       51 
51 
     | 
    
         
             
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
       52 
52 
     | 
    
         
             
              requirements:
         
     | 
| 
       53 
     | 
    
         
            -
              - -  
     | 
| 
      
 53 
     | 
    
         
            +
              - - ">="
         
     | 
| 
       54 
54 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       55 
55 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       56 
56 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       57 
57 
     | 
    
         
             
              requirements:
         
     | 
| 
       58 
     | 
    
         
            -
              - -  
     | 
| 
      
 58 
     | 
    
         
            +
              - - ">="
         
     | 
| 
       59 
59 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       60 
60 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       61 
61 
     | 
    
         
             
            requirements: []
         
     |