|
24 | 24 |
|
25 | 25 | task :upload_shared do
|
26 | 26 | on roles(:all) do
|
| 27 | + puts shared_path |
27 | 28 | upload! 'config/shared/', shared_path, recursive: true
|
| 29 | + puts shared_path |
| 30 | + execute :mv, "#{shared_path}/shared/* #{shared_path}/" |
| 31 | + puts shared_path |
28 | 32 | end
|
29 | 33 | end
|
30 | 34 |
|
|
33 | 37 | within release_path do
|
34 | 38 | # noinspection RubyArgCount
|
35 | 39 | with rails_env: fetch(:rails_env) do
|
36 |
| - secret = capture(:rake, 'secret') |
37 |
| - info "The production secret is '#{secret}'" |
| 40 | + production = capture(:rake, 'secret') |
| 41 | + development = capture(:rake, 'secret') |
| 42 | + test = capture(:rake, 'secret') |
| 43 | + info "The production secret is '#{production}'" |
| 44 | + info "The development secret is '#{development}'" |
| 45 | + info "The test secret is '#{test}'" |
38 | 46 | secrets = "production: \n"
|
39 |
| - secrets += " secret_key_base: #{secret}" |
| 47 | + secrets += " secret_key_base: #{production} \n" |
| 48 | + secrets += "development: \n" |
| 49 | + secrets += " secret_key_base: #{development} \n" |
| 50 | + secrets += "test: \n" |
| 51 | + secrets += " secret_key_base: #{test} \n" |
40 | 52 |
|
41 | 53 | execute :echo, "-e '#{secrets}' > #{release_path}/config/secrets.yml"
|
42 |
| - |
43 |
| - # execute :echo, "'production: ' > #{release_path}/config/secrets.yml" |
44 |
| - # execute :echo, "' secret_key_base: #{secret}' >> #{release_path}/config/secrets.yml" |
45 | 54 | end
|
46 | 55 | end
|
47 | 56 | end
|
|
0 commit comments