capistrano-cul 0.1.1 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +13 -0
- data/VERSION +1 -1
- data/capistrano-cul.gemspec +7 -1
- data/lib/capistrano/tasks/wp/deploy.cap +15 -0
- data/lib/capistrano/tasks/wp/migrate.cap +2 -4
- metadata +50 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 29bd16b319da75027598193f5a936771c3c8bd5ac5b46031874b14d8cbb2b44d
|
4
|
+
data.tar.gz: 522e3368cadebd22ed13a443979003d09a04cee52bdf0cabee06b5a70c8d4f0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '01936834a675f3c5a5dfe414a52678c78e13b6d841e2e0fd5ed853a36ddd0c4299e6152204d2494eefd7371f9d0a29b53b1b067a87485fb8b45b95ba680f4c8e'
|
7
|
+
data.tar.gz: f367e213d4265aab6414fcc1345a98678d2961e9c05109afff50bac62d26995c74dc27407ce872e17674d1a16a5da98af600bb2d81509cb88b2a1f59ae383ce2
|
data/README.md
CHANGED
@@ -51,27 +51,35 @@ require 'capistrano/cul/wp'
|
|
51
51
|
1. `cap {env} cul:wp:setup`
|
52
52
|
|
53
53
|
Sets up a WordPress docroot and runs deployment; does not install WordPress and does not create any users.
|
54
|
+
|
54
55
|
2. `cap {env} cul:wp:install`
|
55
56
|
|
56
57
|
Runs a WordPress installation for a newly set up instance and creates a new admin user.
|
58
|
+
|
57
59
|
3. `cap {env} cul:wp:create_symlinks`
|
58
60
|
|
59
61
|
Creates symlinks for custom plugins and themes as part of a WordPress deployment. Generally run as an `after :deploy` hook.
|
62
|
+
|
60
63
|
4. `cap {env} cul:wp:searchreplace`
|
61
64
|
|
62
65
|
Runs a search and replace operation on the tables in a WordPress installation.
|
66
|
+
|
63
67
|
5. `cap {env} cul:wp:migrate:copy_from`
|
64
68
|
|
65
69
|
Copies the WordPress installation from one environment to another (e.g. prod to dev)
|
70
|
+
|
66
71
|
6. `cap {env} cul:wp:update:core`
|
67
72
|
|
68
73
|
Updates WordPress core to the latest version.
|
74
|
+
|
69
75
|
7. `cap {env} cul:wp:update:plugins`
|
70
76
|
|
71
77
|
Updates non-repo-managed plugins to the latest version.
|
78
|
+
|
72
79
|
8. `cap {env} cul:wp:update:themes`
|
73
80
|
|
74
81
|
Updates non-repo-managed themes to the latest version.
|
82
|
+
|
75
83
|
9. `cap {env} cul:wp:update:all`
|
76
84
|
|
77
85
|
Updates WordPress core, plugins, and themes (in that order) by calling update:core, update:plugins and update:themes tasks.
|
@@ -100,6 +108,11 @@ set :wp_custom_plugins, {
|
|
100
108
|
'custom-plugin-file.php' => 'plugins/custom-plugin-file.php',
|
101
109
|
'custom-plugin-directory' => 'plugins/custom-plugin-directory'
|
102
110
|
}
|
111
|
+
|
112
|
+
set :additional_plugins_from_remote_zip, [
|
113
|
+
'https://github.com/cul/cf-byline/archive/v1.0.0.zip'
|
114
|
+
]
|
115
|
+
|
103
116
|
set :wp_custom_themes, {
|
104
117
|
'mytheme' => 'themes/mytheme'
|
105
118
|
}
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|
data/capistrano-cul.gemspec
CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "capistrano-cul"
|
7
7
|
spec.version = IO.read("VERSION").strip
|
8
|
-
spec.authors = ["Carla Galarza", "Columbia University Libraries"]
|
8
|
+
spec.authors = ["Carla Galarza", "Eric O'Hanlon", "Columbia University Libraries"]
|
9
9
|
spec.email = ["cmg2228@columbia.edu"]
|
10
10
|
|
11
11
|
spec.summary = "Common capistrano tasks shared across projects at CUL"
|
@@ -22,5 +22,11 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_dependency 'capistrano', '~> 3.1'
|
23
23
|
spec.add_dependency 'capistrano-git-with-submodules', '~> 2.0'
|
24
24
|
|
25
|
+
# For supporting newer OpenSSH keys (for capistrano deployments)
|
26
|
+
spec.add_dependency 'net-ssh', '>= 5'
|
27
|
+
spec.add_dependency 'ed25519', '>= 1.2.4'
|
28
|
+
spec.add_dependency 'bcrypt_pbkdf', '>= 1.0.1'
|
29
|
+
|
30
|
+
|
25
31
|
spec.add_development_dependency "bundler", "~> 1.15"
|
26
32
|
end
|
@@ -7,6 +7,7 @@ namespace :cul do
|
|
7
7
|
after 'deploy:starting', 'cul:wp:enable_maintenance_mode'
|
8
8
|
|
9
9
|
after :deploy, 'cul:wp:deploy:download_cul_allowed_upload_types_plugin'
|
10
|
+
after :deploy, 'cul:wp:deploy:install_additional_plugins_from_remote_zip'
|
10
11
|
after :deploy, 'cul:wp:deploy:create_symlinks'
|
11
12
|
after :deploy, 'cul:wp:disable_maintenance_mode'
|
12
13
|
|
@@ -39,6 +40,20 @@ namespace :cul do
|
|
39
40
|
end
|
40
41
|
end
|
41
42
|
|
43
|
+
desc "Installs remote http/https-location zip file plugins specified in the :additional_plugins_from_remote_zip variable"
|
44
|
+
task :install_additional_plugins_from_remote_zip do
|
45
|
+
on roles(:web) do
|
46
|
+
within File.join(fetch(:wp_docroot)) do
|
47
|
+
plugin_zip_urls = fetch(:additional_plugins_from_remote_zip) || []
|
48
|
+
# Make sure that all of the URLs start with http:// or https://
|
49
|
+
raise 'Found non-http/https url in :additional_plugins_from_remote_zip' if plugin_zip_urls.detect { |val| val !~ /^https?:\/\// }
|
50
|
+
plugin_zip_urls.each do |plugin_url|
|
51
|
+
execute :wp, (fetch(:multisite, false) ? "--url=#{fetch(:dest_multisite_domain)}" : ''), 'plugin', 'install', plugin_url, '--force'
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
42
57
|
desc "Creates all necessary symlinks for a WP deployment"
|
43
58
|
task :create_symlinks do
|
44
59
|
on roles(:web) do
|
@@ -170,10 +170,8 @@ namespace :cul do
|
|
170
170
|
|
171
171
|
desc "Copies certain wp-content (everything other than plugins, themes, and mu-plugins) from one environment to another (e.g. prod to dev). This task is part of the :copy_from task and isn't meant to be called directly."
|
172
172
|
task :copy_database do
|
173
|
-
|
174
|
-
|
175
|
-
remote_server_db_export_tempfile_path = Dir::Tmpname.make_tmpname '/tmp/', db_export_tempfile
|
176
|
-
local_server_db_export_file_path = File.join(fetch(:wp_docroot), db_export_tempfile)
|
173
|
+
remote_server_db_export_tempfile_path = Tempfile.create(['db_export_tempfile', '.sql'], '/tmp/').path
|
174
|
+
local_server_db_export_file_path = File.join(fetch(:wp_docroot), File.basename(remote_server_db_export_tempfile_path))
|
177
175
|
|
178
176
|
# Export database from source WordPress instance
|
179
177
|
on fetch(:remote_user) + '@' + fetch(:src_wp_server) do
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-cul
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carla Galarza
|
8
|
+
- Eric O'Hanlon
|
8
9
|
- Columbia University Libraries
|
9
|
-
autorequire:
|
10
|
+
autorequire:
|
10
11
|
bindir: exe
|
11
12
|
cert_chain: []
|
12
|
-
date:
|
13
|
+
date: 2022-01-21 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: capistrano
|
@@ -39,6 +40,48 @@ dependencies:
|
|
39
40
|
- - "~>"
|
40
41
|
- !ruby/object:Gem::Version
|
41
42
|
version: '2.0'
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: net-ssh
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '5'
|
50
|
+
type: :runtime
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '5'
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: ed25519
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 1.2.4
|
64
|
+
type: :runtime
|
65
|
+
prerelease: false
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 1.2.4
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: bcrypt_pbkdf
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.0.1
|
78
|
+
type: :runtime
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: 1.0.1
|
42
85
|
- !ruby/object:Gem::Dependency
|
43
86
|
name: bundler
|
44
87
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,7 +96,7 @@ dependencies:
|
|
53
96
|
- - "~>"
|
54
97
|
- !ruby/object:Gem::Version
|
55
98
|
version: '1.15'
|
56
|
-
description:
|
99
|
+
description:
|
57
100
|
email:
|
58
101
|
- cmg2228@columbia.edu
|
59
102
|
executables: []
|
@@ -82,7 +125,7 @@ homepage: https://github.com/cul/capistrano-cul
|
|
82
125
|
licenses:
|
83
126
|
- MIT
|
84
127
|
metadata: {}
|
85
|
-
post_install_message:
|
128
|
+
post_install_message:
|
86
129
|
rdoc_options: []
|
87
130
|
require_paths:
|
88
131
|
- lib
|
@@ -97,9 +140,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
140
|
- !ruby/object:Gem::Version
|
98
141
|
version: '0'
|
99
142
|
requirements: []
|
100
|
-
|
101
|
-
|
102
|
-
signing_key:
|
143
|
+
rubygems_version: 3.3.5
|
144
|
+
signing_key:
|
103
145
|
specification_version: 4
|
104
146
|
summary: Common capistrano tasks shared across projects at CUL
|
105
147
|
test_files: []
|