capistrano-django 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/capistrano/django.rb +10 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b56446c68da2f73855e30a3f193f7439581ccf21
|
4
|
+
data.tar.gz: 50730972d7ac9a5253394e4423719fbb2ed6338d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 249176238b47012692c47166a1fd2e62dc7a310081ca99eee6e2c45265acd7735a74b9d6955502354809de11d5ca7998f9e530250f2872f6e1bc78cd69aba884
|
7
|
+
data.tar.gz: 1427c60e3639682a0312494a6041fb9b1719b025fe500e69b8c5103f6a4cf303c0f6b967f5a84b7a8fb3b1c8f55148e9a844f2bea824bf0449d3a8f9a3f27710
|
data/lib/capistrano/django.rb
CHANGED
@@ -16,8 +16,9 @@ namespace :python do
|
|
16
16
|
desc "Create a python virtualenv"
|
17
17
|
task :create_virtualenv do
|
18
18
|
on roles(:all) do |h|
|
19
|
-
|
20
|
-
execute "
|
19
|
+
virtualenv_path = File.join(release_path, 'virtualenv')
|
20
|
+
execute "virtualenv #{virtualenv_path}"
|
21
|
+
execute "#{virtualenv_path}/bin/pip install -r #{release_path}/#{fetch(:pip_requirements)}"
|
21
22
|
end
|
22
23
|
if fetch(:flask)
|
23
24
|
invoke 'flask:setup'
|
@@ -71,7 +72,7 @@ namespace :django do
|
|
71
72
|
|
72
73
|
desc "Symlink django settings to deployed.py"
|
73
74
|
task :symlink_settings do
|
74
|
-
settings_path =
|
75
|
+
settings_path = File.join(release_path, fetch(:django_settings_dir))
|
75
76
|
on roles(:all) do
|
76
77
|
execute "ln -s #{settings_path}/#{fetch(:django_settings)}.py #{settings_path}/deployed.py"
|
77
78
|
end
|
@@ -80,14 +81,18 @@ namespace :django do
|
|
80
81
|
desc "Symlink wsgi script to live.wsgi"
|
81
82
|
task :symlink_wsgi do
|
82
83
|
on roles(:web) do
|
83
|
-
wsgi_path = File.join(release_path, fetch(:wsgi_path
|
84
|
+
wsgi_path = File.join(release_path, fetch(:wsgi_path, 'wsgi'))
|
84
85
|
execute "ln -sf #{wsgi_path}/main.wsgi #{wsgi_path}/live.wsgi"
|
85
86
|
end
|
86
87
|
end
|
87
88
|
|
88
89
|
desc "Run django migrations"
|
89
90
|
task :migrate do
|
90
|
-
|
91
|
+
if fetch(:multidb)
|
92
|
+
django("sync_all", '--noinput')
|
93
|
+
else
|
94
|
+
django("syncdb", "--noinput --migrate")
|
95
|
+
end
|
91
96
|
end
|
92
97
|
|
93
98
|
end
|