capistrano-olympus 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 +4 -4
- data/CHANGELOG +9 -0
- data/README.md +12 -1
- data/capistrano-olympus.gemspec +2 -1
- data/lib/capistrano/olympus.rb +3 -1
- data/lib/capistrano/tasks/capistrano-deploy.rake +11 -3
- data/lib/capistrano/tasks/composer.rake +14 -0
- data/lib/capistrano/vars/defaults.rb +1 -5
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 305153a056afb0c3c8826cf865537e8c0edfc589
|
4
|
+
data.tar.gz: 3fd00c040615ce49ed7610f93971f5f983bad985
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bdb7249637a74349c7d6616834809355f9d0d92799ff8d9cedb42d9fa43c2871ee9b54d457fa5628b6e822604ccbcbbbe4193b2cd050143d5d6eeee6294cc2e
|
7
|
+
data.tar.gz: c1003254260c5f65f4cb2a89b60aef4371abeae44219d858c83ae863e7f935039d10586efe32a307cf042d5fa1412ef1f44886a1cc2aa278ffd293fde5ca9e94
|
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -17,6 +17,7 @@ Build with ♥ for **WordPress developers**._
|
|
17
17
|
It depends on the following Capistrano tasks to deploy a WordPress application:
|
18
18
|
|
19
19
|
+ capistrano-composer: https://github.com/capistrano/composer
|
20
|
+
+ composer: https://github.com/fazibear/colorize
|
20
21
|
+ sshkit-sudo: https://github.com/kentaroi/sshkit-sudo
|
21
22
|
|
22
23
|
---
|
@@ -28,7 +29,7 @@ Require `capistrano-olympus` in your gem file:
|
|
28
29
|
```
|
29
30
|
# Gemfile
|
30
31
|
gem 'capistrano', '~> 3.4'
|
31
|
-
gem 'capistrano-olympus', '~> 0.0.
|
32
|
+
gem 'capistrano-olympus', '~> 0.0.6'
|
32
33
|
```
|
33
34
|
|
34
35
|
### Usage
|
@@ -59,6 +60,16 @@ set :localurl, fetch(:localurl, 'http://www.domain.tld')
|
|
59
60
|
|
60
61
|
---
|
61
62
|
|
63
|
+
### Deployment
|
64
|
+
|
65
|
+
Depending on your stage files, you can deploy simply thanks to the following command line:
|
66
|
+
|
67
|
+
```
|
68
|
+
bundle exec cap production deploy
|
69
|
+
```
|
70
|
+
|
71
|
+
---
|
72
|
+
|
62
73
|
### All we need is looooooooooooove :)
|
63
74
|
|
64
75
|
[](https://salt.bountysource.com/teams/olympus) [](https://www.bountysource.com/teams/olympus)
|
data/capistrano-olympus.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = 'capistrano-olympus'
|
7
|
-
gem.version = '0.0.
|
7
|
+
gem.version = '0.0.6'
|
8
8
|
gem.date = Time.now.strftime("%Y-%m-%d")
|
9
9
|
gem.authors = ['Achraf Chouk']
|
10
10
|
gem.email = ['achrafchouk@gmail.com']
|
@@ -21,6 +21,7 @@ Gem::Specification.new do |gem|
|
|
21
21
|
'lib/capistrano-olympus.rb',
|
22
22
|
'lib/capistrano/olympus.rb',
|
23
23
|
'lib/capistrano/tasks/capistrano-deploy.rake',
|
24
|
+
'lib/capistrano/tasks/composer.rake',
|
24
25
|
'lib/capistrano/tasks/database.rake',
|
25
26
|
'lib/capistrano/tasks/directories.rake',
|
26
27
|
'lib/capistrano/tasks/files.rake',
|
data/lib/capistrano/olympus.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
require 'colorize'
|
2
2
|
require 'sshkit/sudo'
|
3
3
|
|
4
|
-
# Core tasks for deploying Olympus framework with WordPress
|
4
|
+
# Core tasks for deploying Olympus framework with WordPress and composer
|
5
5
|
load File.expand_path("../tasks/capistrano-deploy.rake", __FILE__)
|
6
|
+
load File.expand_path("../tasks/composer.rake", __FILE__)
|
6
7
|
load File.expand_path("../tasks/database.rake", __FILE__)
|
7
8
|
load File.expand_path("../tasks/directories.rake", __FILE__)
|
8
9
|
load File.expand_path("../tasks/files.rake", __FILE__)
|
@@ -17,6 +18,7 @@ load File.expand_path("../tasks/varnish.rake", __FILE__)
|
|
17
18
|
# Load defaults variables
|
18
19
|
namespace :load do
|
19
20
|
|
21
|
+
desc "Include defaults vars"
|
20
22
|
task :defaults do
|
21
23
|
load "capistrano/vars/defaults.rb"
|
22
24
|
end
|
@@ -12,16 +12,21 @@ namespace :deploy do
|
|
12
12
|
|
13
13
|
# Check the very last action made: it means all setup processes are done!
|
14
14
|
if test "[ ! -f \"#{shared_path}/web/robots.txt\" ]"
|
15
|
-
puts "Create directories"
|
15
|
+
puts "Create directories".colorize(:light_blue)
|
16
16
|
invoke "directories:do_actions"
|
17
17
|
|
18
|
-
puts "Create files"
|
18
|
+
puts "Create files".colorize(:light_blue)
|
19
19
|
invoke "files:do_actions"
|
20
20
|
end
|
21
21
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
+
desc "Install composer vendors"
|
26
|
+
task :composer do
|
27
|
+
invoke "composer:install"
|
28
|
+
end
|
29
|
+
|
25
30
|
desc "Restart services and clear caches"
|
26
31
|
task :clear do
|
27
32
|
on release_roles(:all) do
|
@@ -42,7 +47,10 @@ namespace :deploy do
|
|
42
47
|
end
|
43
48
|
|
44
49
|
# Create files and dirs when its needed
|
45
|
-
before
|
50
|
+
before :starting, 'deploy:setup'
|
51
|
+
|
52
|
+
# Initialize composer
|
53
|
+
after :starting, 'deploy:composer'
|
46
54
|
|
47
55
|
# Restart services and clear caches
|
48
56
|
after :publishing, 'deploy:clear'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Composer
|
2
|
+
namespace :composer do
|
3
|
+
|
4
|
+
desc "Composer run install"
|
5
|
+
task :install do
|
6
|
+
on release_roles(:all) do
|
7
|
+
|
8
|
+
puts "Install composer vendors in #{release_path}".colorize(:light_blue)
|
9
|
+
execute "cd #{release_path} && composer install --quiet"
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
@@ -26,11 +26,7 @@ set :ssh_options, {
|
|
26
26
|
# ~~~~
|
27
27
|
|
28
28
|
# Setup Composer
|
29
|
-
|
30
|
-
set :composer_roles, :all
|
31
|
-
set :composer_working_dir, -> { fetch(:release_path) }
|
32
|
-
set :composer_dump_autoload_flags, '--optimize'
|
33
|
-
set :composer_download_url, 'https://getcomposer.org/installer'
|
29
|
+
# Nothing to customize
|
34
30
|
|
35
31
|
# ~~~~
|
36
32
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-olympus
|
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
|
- Achraf Chouk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -80,6 +80,7 @@ files:
|
|
80
80
|
- lib/capistrano-olympus.rb
|
81
81
|
- lib/capistrano/olympus.rb
|
82
82
|
- lib/capistrano/tasks/capistrano-deploy.rake
|
83
|
+
- lib/capistrano/tasks/composer.rake
|
83
84
|
- lib/capistrano/tasks/database.rake
|
84
85
|
- lib/capistrano/tasks/directories.rake
|
85
86
|
- lib/capistrano/tasks/files.rake
|