railman-deployment 1.1.1 → 1.1.2

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: 2e790b837727c32396377be2a1a794438861082e
4
- data.tar.gz: 768754b7d663ad8f76c79d7fcf168992ce70a119
3
+ metadata.gz: 676fe8d7b3463a4f37d6fc785c888413bec3272f
4
+ data.tar.gz: f546d4b31ead1df2082c6eacb691e45467a56494
5
5
  SHA512:
6
- metadata.gz: d8a7e04c95f41cc4c8388240312ba91ac438799818a171efe4089a09ada8b27a19d6546ca5e724202ff96c6586de6cbb67805eba53c43b810937de8da0842698
7
- data.tar.gz: f8fd75cf235f8ceb66b66eb99f5b89adbdfe409f5a4fba75aa9f1ff20f041fd248fcd513e482ee5b829178ffd8575824be25197782d31c2544a02a7df7f58158
6
+ metadata.gz: 41af320341d6499f8f1ebd492a7aa29b12214d7784bb89e98caeb72376c8ac4851334ca4cde94c9b0f3e9d0f25996868da1d8d737a6bd3e89aea5d3cbbfef592
7
+ data.tar.gz: e919bd6d76c89745021b08868018a89ffd0eeafb886736aef87de0ab6fe3c2c4585e6655b3acd4e0d24eceb6552217597902a1f92e2c02c334f4de5af0e4e4f0
@@ -36,25 +36,23 @@ end
36
36
  desc 'Setup spa application for the first time on a server'
37
37
  task :setup_spa do
38
38
  on roles(:all) do
39
- with fetch(:environment) do
40
- server_conf_dir = "#{fetch(:deploy_to)}/config/server"
41
- if fetch(:spa_application)
42
- if test "[ -d #{fetch(:deploy_spa_to)} ]"
43
- invoke :fetch_and_reset_spa_git_repository
44
- else
45
- execute :git, :clone, fetch(:spa_repo_url), fetch(:deploy_spa_to)
46
- end
39
+ server_conf_dir = "#{fetch(:deploy_to)}/config/server"
40
+ if fetch(:spa_application)
41
+ if test "[ -d #{fetch(:deploy_spa_to)} ]"
42
+ invoke :fetch_and_reset_spa_git_repository
43
+ else
44
+ execute :git, :clone, fetch(:spa_repo_url), fetch(:deploy_spa_to)
45
+ end
47
46
 
48
- within fetch(:deploy_spa_to) do
49
- execute :mkdir, "-p #{fetch(:deploy_spa_to)}/public"
50
- execute :yarn
51
- execute :yarn, 'run build'
52
- execute "rsync -avz --delete ./#{fetch(:deploy_spa_to)}/dist/ ./#{fetch(:deploy_spa_to)}/public/"
53
- execute :cp, "#{server_conf_dir}/nginx_spa.conf /etc/nginx/sites-available/#{fetch(:spa_domain)}"
54
- execute :ln, "-s -f /etc/nginx/sites-available/#{fetch(:spa_domain)} /etc/nginx/sites-enabled/"
55
- execute :service, 'nginx restart'
56
- execute :certbot, "--nginx -d #{fetch(:spa_domain)}"
57
- end
47
+ within fetch(:deploy_spa_to) do
48
+ execute :mkdir, "-p #{fetch(:deploy_spa_to)}/public"
49
+ execute :yarn
50
+ execute :yarn, 'run build'
51
+ execute "rsync -avz --delete #{fetch(:deploy_spa_to)}/dist/ #{fetch(:deploy_spa_to)}/public/"
52
+ execute :cp, "#{server_conf_dir}/nginx_spa.conf /etc/nginx/sites-available/#{fetch(:spa_domain)}"
53
+ execute :ln, "-s -f /etc/nginx/sites-available/#{fetch(:spa_domain)} /etc/nginx/sites-enabled/"
54
+ execute :service, 'nginx restart'
55
+ execute :certbot, "--nginx -d #{fetch(:spa_domain)}"
58
56
  end
59
57
  end
60
58
  end
@@ -108,7 +106,7 @@ task :deploy_spa do
108
106
  invoke :fetch_and_reset_spa_git_repository
109
107
  execute :yarn
110
108
  execute :yarn, 'run build'
111
- execute "rsync -avz --delete ./#{fetch(:deploy_spa_to)}/dist/ ./#{fetch(:deploy_spa_to)}/public/"
109
+ execute "rsync -avz --delete #{fetch(:deploy_spa_to)}/dist/ #{fetch(:deploy_spa_to)}/public/"
112
110
  execute :service, 'nginx restart'
113
111
  end if test "[ -d #{fetch(:deploy_spa_to)} ]"
114
112
  end
@@ -1,3 +1,3 @@
1
1
  module RailmanDeployment
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railman-deployment
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Jancev