capistrano-magento2 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5899cb85ebb2927b4fe4204c5fac29bcb4af9021
4
- data.tar.gz: da7de9d38d7dc4f6305a9eefe4f79e4f4be7c00b
3
+ metadata.gz: 4d33fbaa9e874dfb8dad08bb1f0351e6ce42ef6f
4
+ data.tar.gz: 401ce96eabbc57ea5d82b428d950833fbd7490cf
5
5
  SHA512:
6
- metadata.gz: 148251eaa1d77e14b4d7919051e0da0d8dfefe6057a34500743395d9d8661482655b7dc9f245e6148776df35313da85144df015964e41fbe53fa6b717574de70
7
- data.tar.gz: d1f26ea16820b441257fc875098f4feab784e43ee943553373dbfcb36e36166f00faede11361efcce500cc4e455c3cd33fd88f73b16c7ff165a56843ff643a23
6
+ metadata.gz: fa27e96db8696820d9d63d544a1500222f1d24e73a200a3e8d5948be8c5f4227188c943e25015514c7ca918bf30c68741ebb97e401436e74e303a65f15ebee7c
7
+ data.tar.gz: dc73dd16e09abd4021b2cf2434d4505b8b33cdcf22ab9342862d247a1d15591fdc431310bad8054db704b02a8828de9704e59a01616eec11e2e256460b276e41
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Capistrano::Magento2 Change Log
2
2
 
3
+ 0.2.4
4
+ ==========
5
+
6
+ * Added internal `magento:deploy:check` task and `:linked_files_touch` setting to minimize manual server setup
7
+ * Moved default linked file for sitemap.xml into pub directory
8
+
3
9
  0.2.3
4
10
  ==========
5
11
 
data/README.md CHANGED
@@ -116,7 +116,7 @@ set :linked_files, [
116
116
  'app/etc/env.php',
117
117
  'var/.setup_cronjob_status',
118
118
  'var/.update_cronjob_status',
119
- 'sitemap.xml'
119
+ 'pub/sitemap.xml'
120
120
  ]
121
121
 
122
122
  set :linked_dirs, [
@@ -145,16 +145,6 @@ To see what process the built-in routine runs, take a look at the included rake
145
145
 
146
146
  Before deploying with Capistrano, you must update each of your web servers to point to a `current` directory inside of the `:deploy_to` directory. For example: `/var/www/html/current` Refer to the [Capistrano Structure](http://capistranorb.com/documentation/getting-started/structure/) to learn more about Capistrano's folder structure.
147
147
 
148
- ### Create Linked Files
149
-
150
- Capistrano assumes that the `:linked_files` files will exist, so before you deploy for the first time, you need to create those files. On each of your web servers, create them using a command like this:
151
-
152
- ```shell
153
- $ cd /var/www/html
154
- $ mkdir -p shared/var shared/app/etc
155
- $ touch shared/app/etc/env.php shared/var/.setup_cronjob_status shared/var/.update_cronjob_status shared/sitemap.xml
156
- ```
157
-
158
148
  ## Magento Specific Tasks
159
149
 
160
150
  All Magento 2 tasks used by the built-in `deploy.rake` file as well as some additional commands are implemented and exposed to the end-user for use directly via the cap tool. You can also see this list by running `cap -T` from your shell.
@@ -9,6 +9,6 @@
9
9
 
10
10
  module Capistrano
11
11
  module Magento2
12
- VERSION = '0.2.3'
12
+ VERSION = '0.2.4'
13
13
  end
14
14
  end
@@ -8,9 +8,11 @@
8
8
  ##
9
9
 
10
10
  namespace :deploy do
11
+ before 'deploy:check:linked_files', 'magento:deploy:check'
12
+
11
13
  task :updated do
12
14
  on release_roles :all do
13
- invoke 'magento:setup:verify'
15
+ invoke 'magento:deploy:verify'
14
16
  invoke 'magento:composer:install'
15
17
  invoke 'magento:setup:permissions'
16
18
  invoke 'magento:setup:static-content:deploy'
@@ -93,8 +93,21 @@ namespace :magento do
93
93
  end
94
94
  end
95
95
  end
96
-
97
- namespace :setup do
96
+
97
+ namespace :deploy do
98
+ task :check do
99
+ on release_roles :all do
100
+ next unless any? :linked_files_touch
101
+ on release_roles :all do |host|
102
+ join_paths(shared_path, fetch(:linked_files_touch)).each do |file|
103
+ unless test "[ -f #{file} ]"
104
+ execute "touch #{file}"
105
+ end
106
+ end
107
+ end
108
+ end
109
+ end
110
+
98
111
  task :verify do
99
112
  on release_roles :all do
100
113
  unless test "[ -f #{release_path}/app/etc/config.php ]"
@@ -111,7 +124,9 @@ namespace :magento do
111
124
  end
112
125
  end
113
126
  end
127
+ end
114
128
 
129
+ namespace :setup do
115
130
  desc 'Run the Magento upgrade process'
116
131
  task :upgrade do
117
132
  on release_roles :all do
@@ -264,7 +279,14 @@ namespace :load do
264
279
  'app/etc/env.php',
265
280
  'var/.setup_cronjob_status',
266
281
  'var/.update_cronjob_status',
267
- 'sitemap.xml'
282
+ 'pub/sitemap.xml'
283
+ )
284
+
285
+ set :linked_files_touch, fetch(:linked_files_touch, []).push(
286
+ 'app/etc/env.php',
287
+ 'var/.setup_cronjob_status',
288
+ 'var/.update_cronjob_status',
289
+ 'pub/sitemap.xml'
268
290
  )
269
291
 
270
292
  set :linked_dirs, fetch(:linked_dirs, []).push(
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-magento2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Alger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-10 00:00:00.000000000 Z
11
+ date: 2016-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano