capistrano-scm-none 0.1.0
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 +7 -0
- data/.gitignore +10 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +95 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/capistrano-scm-none.gemspec +28 -0
- data/lib/capistrano/scm/none/version.rb +7 -0
- data/lib/capistrano/scm/none.rb +41 -0
- metadata +111 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1615a25325223533a739e76261e388a6645e10cd
|
4
|
+
data.tar.gz: becda5174104698b1f65f3fd0ddfd7bc71754e66
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 95ba95888d6670015294d1f17aacf777e123b304369928a7b1930051fb8252f91ab2f16505e91d525e199b6b885c1d57671bb44910d378d3127398cb7a9d4fb8
|
7
|
+
data.tar.gz: 2be3606401b2177134c097a68762cafb4cf83a33901efeb223faa00e23f33a336a7aadf1a7fd8ee951a5272e1d010c61e479d14879450023807385e56d3158d5
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 dusty candland
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
# Capistrano::Scm::None
|
2
|
+
|
3
|
+
This is [SCM Plugin](http://capistranorb.com/documentation/advanced-features/custom-scm/)
|
4
|
+
for [Capistrano 3.7+](http://capistranorb.com/). It allows you define your own
|
5
|
+
`deploy:upload` task that gets called to put code on the remote hosts.
|
6
|
+
|
7
|
+
Why? I use Capistrano to deploy a number of Clojure apps. These apps only
|
8
|
+
need the compiled JAR file. Maybe one or two support files. Also makes
|
9
|
+
sense to compile once on the local machine/build server and deploy to
|
10
|
+
multiple hosts. I love Capistrano and have been using it for a long time,
|
11
|
+
but w/ the v3 the copy deploy strategry was removed. I don't really
|
12
|
+
disagree with that and this is actually cleaner then how I was doing things
|
13
|
+
in v2.
|
14
|
+
|
15
|
+
|
16
|
+
## Installation
|
17
|
+
|
18
|
+
Add this line to your application's Gemfile:
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
group :development do
|
22
|
+
gem "capistrano-scm-none", "~> 0.1"
|
23
|
+
end
|
24
|
+
```
|
25
|
+
|
26
|
+
And then execute:
|
27
|
+
|
28
|
+
$ bundle
|
29
|
+
|
30
|
+
Or install it yourself as:
|
31
|
+
|
32
|
+
$ gem install capistrano-scm-none
|
33
|
+
|
34
|
+
|
35
|
+
## Usage
|
36
|
+
|
37
|
+
In your `Capfile` require the gem and install the plugin. Comment out
|
38
|
+
any current SCM plugin.
|
39
|
+
|
40
|
+
```ruby
|
41
|
+
require 'capistrano/scm/none'
|
42
|
+
install_plugin Capistrano::Scm::None::Plugin
|
43
|
+
```
|
44
|
+
|
45
|
+
In a rake file in `/lib/capistrano/tasks` add a `deploy:upload` task that
|
46
|
+
uploads whatever files you need.
|
47
|
+
|
48
|
+
Here's an example.
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
namespace :deploy do
|
52
|
+
desc "upload jar"
|
53
|
+
task :upload do
|
54
|
+
on release_roles :all do
|
55
|
+
upload! "target/standalone.jar",
|
56
|
+
"#{release_path}/standalone.jar"
|
57
|
+
|
58
|
+
upload! "target/run.sh", "#{release_path}/run.sh"
|
59
|
+
|
60
|
+
within release_path do
|
61
|
+
execute :chmod, '+x', 'run.sh'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
```
|
67
|
+
|
68
|
+
|
69
|
+
## Development
|
70
|
+
|
71
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then,
|
72
|
+
run `rake test` to run the tests. You can also run `bin/console` for an
|
73
|
+
interactive prompt that will allow you to experiment.
|
74
|
+
|
75
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
76
|
+
|
77
|
+
|
78
|
+
## Todo
|
79
|
+
|
80
|
+
* Better tests.
|
81
|
+
* Get SCM revision number from local repo.
|
82
|
+
|
83
|
+
|
84
|
+
## Contributing
|
85
|
+
|
86
|
+
Bug reports and pull requests are welcome on GitHub at
|
87
|
+
<https://github.com/candland/capistrano-scm-none>.
|
88
|
+
|
89
|
+
|
90
|
+
## License
|
91
|
+
|
92
|
+
The gem is available as open source under the terms of
|
93
|
+
the [MIT License](http://opensource.org/licenses/MIT).
|
94
|
+
|
95
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "capistrano/scm/none"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'capistrano/scm/none/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "capistrano-scm-none"
|
8
|
+
spec.version = Capistrano::Scm::None::VERSION
|
9
|
+
spec.authors = ["dusty candland"]
|
10
|
+
spec.email = ["candland@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{SCM None for Capistrano 3}
|
13
|
+
spec.description = %q{Use Capistrano 3 without source control management on the remote hosts.}
|
14
|
+
spec.homepage = "https://github.com/candland/capistrano-scm-none"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.13"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
27
|
+
spec.add_development_dependency "capistrano", "~> 3.7"
|
28
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require "capistrano/scm/none/version"
|
2
|
+
require "capistrano/scm/plugin"
|
3
|
+
|
4
|
+
module Capistrano
|
5
|
+
module Scm
|
6
|
+
module None
|
7
|
+
class Plugin < ::Capistrano::SCM::Plugin
|
8
|
+
def set_defaults
|
9
|
+
end
|
10
|
+
|
11
|
+
def define_tasks
|
12
|
+
namespace :scm do
|
13
|
+
namespace :none do
|
14
|
+
task :create_release do
|
15
|
+
on release_roles :all do
|
16
|
+
execute :mkdir, "-p", release_path
|
17
|
+
if Rake::Task.task_defined?('deploy:upload')
|
18
|
+
invoke('deploy:upload')
|
19
|
+
else
|
20
|
+
raise "Expecting a deploy:upload task to be defined."
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
task :set_current_revision do
|
26
|
+
# TODO something better here
|
27
|
+
#sh :git, "rev-list --max-count=1 branch"
|
28
|
+
set :current_revision, "do to grab current git revision"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def register_hooks
|
35
|
+
after "deploy:new_release_path", "scm:none:create_release"
|
36
|
+
before "deploy:set_current_revision", "scm:none:set_current_revision"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
metadata
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-scm-none
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- dusty candland
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-12-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.13'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.13'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: capistrano
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.7'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.7'
|
69
|
+
description: Use Capistrano 3 without source control management on the remote hosts.
|
70
|
+
email:
|
71
|
+
- candland@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- ".travis.yml"
|
78
|
+
- Gemfile
|
79
|
+
- LICENSE.txt
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- bin/console
|
83
|
+
- bin/setup
|
84
|
+
- capistrano-scm-none.gemspec
|
85
|
+
- lib/capistrano/scm/none.rb
|
86
|
+
- lib/capistrano/scm/none/version.rb
|
87
|
+
homepage: https://github.com/candland/capistrano-scm-none
|
88
|
+
licenses:
|
89
|
+
- MIT
|
90
|
+
metadata: {}
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
93
|
+
require_paths:
|
94
|
+
- lib
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
requirements: []
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 2.5.1
|
108
|
+
signing_key:
|
109
|
+
specification_version: 4
|
110
|
+
summary: SCM None for Capistrano 3
|
111
|
+
test_files: []
|