capistrano-typo3 0.3.4 → 0.4.1

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: 9f5d21a82827f9fc925651b3d05f252e390431e8
4
- data.tar.gz: fef24dac51b3398a7b39f595499a012b181086fc
3
+ metadata.gz: 588dd24bea16f6f6de4ab80414bb9ad0a2dd0c17
4
+ data.tar.gz: 95babcf6d87cbdfee768d92f970b0355cb0fec13
5
5
  SHA512:
6
- metadata.gz: 17fe9f0215d5bd82422ed5f92c718f1c83ad878295dd481c2d375c87dc0a824e7ee47393e288a4047e7f832f6b7a0d7df3c259b9d2fbff148600dbb7eb9b76ee
7
- data.tar.gz: 113cfd2c2b54b8439c7bf6e32b82c3476797d7fd1cfaf31698bdc03519aa32d96e0ade1fda084a88ef3bb43753f916ed2a5c403d5f32f3dca085429973b8bd3e
6
+ metadata.gz: ed72153449a6c86783174217ace46945859326f39e07544ff8c16619187643933d3d58c2654c32b40d0b956db2257a23729a16b7f0f695c330fb95c62a8da886
7
+ data.tar.gz: adc2083a1142d20396b8567ddd95b6d069e346b65fb70d2140f6065e6dae261a459e1add752438685392f78ea2410dfdbed24b424ea3ea90a3707257ecd97479
@@ -15,7 +15,7 @@ set :t3_alternative_source_url, nil
15
15
  set :t3_main_version, '7.6'
16
16
  set :t3_post_deployment_commands, []
17
17
  set :t3_db_sync_ignore_tables, []
18
-
18
+ set :t3_ts_constants, []
19
19
 
20
20
  set :typo3_v6_local_conf_path, File.join('current','dummy','typo3conf','LocalConfiguration.php')
21
21
  set :http_protocol, 'http'
@@ -32,8 +32,10 @@ namespace :typo3 do
32
32
  invoke 'deploy' #OKE
33
33
  invoke 'typo3:helper:setup_shared_typo3_dirs' #OKE
34
34
  invoke 'typo3:helper:update_localconf' #OKE
35
+ invoke 'typo3:helper:write_tsconstants' #OKE
35
36
  invoke 'typo3:helper:current_relative_symlink' #OKE
36
37
  invoke 'typo3:helper:restart_webserver' #OKE
38
+ invoke 'typo3:helper:execute_post_deployment_commands'
37
39
 
38
40
  print "environment has been setup, you do need to sync content from old production"
39
41
  end
@@ -49,8 +51,10 @@ namespace :typo3 do
49
51
  invoke 'typo3:content:sync_db_from_production' #OKE
50
52
  invoke 'typo3:content:flush_cache_in_db' #OKE
51
53
  invoke 'typo3:helper:update_localconf' #OKE
54
+ invoke 'typo3:helper:write_tsconstants' #OKE
52
55
  invoke 'typo3:helper:current_relative_symlink' #OKE
53
56
  invoke 'typo3:helper:restart_webserver' #OKE
57
+ invoke 'typo3:helper:execute_post_deployment_commands'
54
58
  end
55
59
 
56
60
  desc "sync db & files and then deploy. Typically for Continuous Integration"
@@ -60,16 +64,20 @@ namespace :typo3 do
60
64
  invoke 'typo3:content:sync_db_from_production'
61
65
  invoke 'typo3:content:flush_cache_in_db'
62
66
  invoke 'typo3:helper:update_localconf'
67
+ invoke 'typo3:helper:write_tsconstants' #OKE
63
68
  invoke 'typo3:helper:current_relative_symlink'
64
69
  invoke 'typo3:helper:restart_webserver'
70
+ invoke 'typo3:helper:execute_post_deployment_commands'
65
71
  end
66
72
 
67
73
  desc "deploy the typo3 way"
68
74
  task :deploy do
69
75
  invoke 'deploy'
70
76
  invoke 'typo3:helper:update_localconf'
77
+ invoke 'typo3:helper:write_tsconstants' #OKE
71
78
  invoke 'typo3:helper:current_relative_symlink'
72
79
  invoke 'typo3:helper:restart_webserver'
80
+ invoke 'typo3:helper:execute_post_deployment_commands'
73
81
  end
74
82
 
75
83
  desc "Make db & files in env. identical to production"
@@ -82,7 +90,6 @@ namespace :typo3 do
82
90
  namespace :hooks do
83
91
  task :after_deploy do
84
92
  invoke 'git:set_remote_url_no_cache'
85
- invoke 'typo3:helper:execute_post_deployment_commands'
86
93
  end
87
94
  end
88
95
 
@@ -266,6 +273,7 @@ DBSYNC6
266
273
  invoke 'typo3:content:sync_db_from_production'
267
274
  invoke 'typo3:content:flush_cache_in_db'
268
275
  invoke 'typo3:helper:update_localconf'
276
+ invoke 'typo3:helper:write_tsconstants' #OKE
269
277
 
270
278
  on roles(:all) do
271
279
  if fetch(:hs_default_upstream_php_engine)
@@ -342,6 +350,7 @@ MSG
342
350
  end
343
351
 
344
352
  namespace :helper do
353
+ desc "execute_post_deployment_commands"
345
354
  task :execute_post_deployment_commands do
346
355
  on roles(:all) do
347
356
 
@@ -419,7 +428,19 @@ deprecation_*.log
419
428
  execute "cd #{fetch(:deploy_to)} && #{cmd2}"
420
429
  end
421
430
  end
431
+ end
422
432
 
433
+ desc "write typo3conf/tsConstants.ts"
434
+ task :write_tsconstants do
435
+ on roles(:all) do
436
+ execute "rm -f #{fetch(:deploy_to)}/current/dummy/typo3conf/tsConstants/*.ts || true"
437
+ execute "mkdir -p #{fetch(:deploy_to)}/current/dummy/typo3conf/tsConstants"
438
+ constantFile = "tsConstants_#{SecureRandom.hex}.ts"
439
+ execute "echo '# Constants written by capistrano-typo3 at: #{Time.now.strftime("%d/%m/%Y %H:%M")}' > #{fetch(:deploy_to)}/current/dummy/typo3conf/tsConstants/#{constantFile}"
440
+ fetch(:t3_ts_constants).each do | ts_const |
441
+ execute "echo '#{ts_const}' >> #{fetch(:deploy_to)}/current/dummy/typo3conf/tsConstants/#{constantFile}"
442
+ end
443
+ end
423
444
  end
424
445
 
425
446
  task :restart_webserver do
@@ -1,3 +1,5 @@
1
+ require 'securerandom'
2
+
1
3
  require "capistrano/typo3/version"
2
4
  require "capistrano/typo3/typo3_helper"
3
5
  require "capistrano/typo3/dt3_div"
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Typo3
3
- VERSION = "0.3.4"
3
+ VERSION = "0.4.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-typo3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pim Snel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-02 00:00:00.000000000 Z
11
+ date: 2017-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler