cap-scm-upload 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENCE.MIT +19 -0
- data/README.md +46 -0
- data/cap-scm-upload.gemspec +17 -0
- data/lib/cap-scm-upload.rb +1 -0
- data/lib/capistrano/upload.rb +16 -0
- metadata +64 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3de986b3dc1bd8b09deb913fbc5e26ca2983a658
|
4
|
+
data.tar.gz: 174bd3b8d85c3afa1fef2324316e62a9dd1d160e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 998d4dca806a4e7d877b8d2f665f9d7aa55d033633d64794e397ca0d28e980b8cd34443d82c261fb73d1b022bd5a732daf032364161d7d75ba192a56fab0a4d6
|
7
|
+
data.tar.gz: 5e0f14be79e892e482e8b4fb44c60c235b59277098b5f7bd7b045c8c269f156a0d35374de5d92c0ec30d6e75f0681d392dd778dc63097ac6fb7fe738dfb9eca1
|
data/LICENCE.MIT
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2014 Conrad Irwin <conrad@bugsnag.com>
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
This gem provides upload support for capistrano. It lets you upload the
|
2
|
+
contents of the `release` directory for each release.
|
3
|
+
|
4
|
+
## Usage
|
5
|
+
|
6
|
+
1. Add `cap-scm-upload` to your Gemfile
|
7
|
+
|
8
|
+
```
|
9
|
+
# Gemfile
|
10
|
+
gem 'cap-scm-upload'
|
11
|
+
```
|
12
|
+
|
13
|
+
2. Use `upload` scm in Capistrano
|
14
|
+
```
|
15
|
+
# Capfile
|
16
|
+
|
17
|
+
require 'cap-scm-upload'
|
18
|
+
set :scm, :upoad
|
19
|
+
```
|
20
|
+
|
21
|
+
3. Fill the release directory before uploading
|
22
|
+
|
23
|
+
```
|
24
|
+
# config/deploy.rb
|
25
|
+
|
26
|
+
desc "Build the app"
|
27
|
+
task :build do
|
28
|
+
sh "rm -rf release"
|
29
|
+
sh "GOOS=linux go build -o release/app"
|
30
|
+
end
|
31
|
+
|
32
|
+
before :'upload:create_release', :build
|
33
|
+
```
|
34
|
+
|
35
|
+
## Config
|
36
|
+
|
37
|
+
You can use `set :local_release_path, "/path/to/your/release"`, the default is
|
38
|
+
the "release" directory in your current directory.
|
39
|
+
|
40
|
+
## Meta-fu
|
41
|
+
|
42
|
+
`cap-scm-upload` is released under the MIT license, see LICENSE.MIT for
|
43
|
+
details. Bug reports and feature requests are welcome.
|
44
|
+
|
45
|
+
This is similar to cap-scm-copy, but lets you choose a subdirectory instead of
|
46
|
+
uploading your working directory.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
Gem::Specification.new do |gem|
|
2
|
+
gem.name = 'cap-scm-upload'
|
3
|
+
gem.version = '0.1.0'
|
4
|
+
|
5
|
+
gem.summary = 'Capistrano upload support'
|
6
|
+
gem.description = "Uploads the contents of the release directory on every deploy"
|
7
|
+
|
8
|
+
gem.authors = ['Conrad Irwin']
|
9
|
+
gem.email = %w(conrad@bugsnag.com)
|
10
|
+
gem.homepage = 'http://github.com/ConradIrwin/cap-scm-upload'
|
11
|
+
|
12
|
+
gem.license = 'MIT'
|
13
|
+
|
14
|
+
gem.add_dependency 'capistrano', '>= 3.0'
|
15
|
+
|
16
|
+
gem.files = `git ls-files`.split("\n")
|
17
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'capistrano/upload'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
set :local_release_path, "release"
|
3
|
+
|
4
|
+
namespace :upload do
|
5
|
+
desc "Upload the release"
|
6
|
+
task :create_release do
|
7
|
+
local_dir = fetch(:local_release_path).to_s
|
8
|
+
on release_roles :all do
|
9
|
+
upload! local_dir, release_path.to_s, recursive: true
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
# required by capistrano
|
14
|
+
task :check
|
15
|
+
task :set_current_revision
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cap-scm-upload
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Conrad Irwin
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-05-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capistrano
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
27
|
+
description: Uploads the contents of the release directory on every deploy
|
28
|
+
email:
|
29
|
+
- conrad@bugsnag.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- LICENCE.MIT
|
35
|
+
- README.md
|
36
|
+
- cap-scm-upload.gemspec
|
37
|
+
- lib/cap-scm-upload.rb
|
38
|
+
- lib/capistrano/upload.rb
|
39
|
+
homepage: http://github.com/ConradIrwin/cap-scm-upload
|
40
|
+
licenses:
|
41
|
+
- MIT
|
42
|
+
metadata: {}
|
43
|
+
post_install_message:
|
44
|
+
rdoc_options: []
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
requirements: []
|
58
|
+
rubyforge_project:
|
59
|
+
rubygems_version: 2.2.2
|
60
|
+
signing_key:
|
61
|
+
specification_version: 4
|
62
|
+
summary: Capistrano upload support
|
63
|
+
test_files: []
|
64
|
+
has_rdoc:
|