capistrano-ash 1.2.0 → 1.2.1
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.
- data/VERSION +1 -1
- data/lib/ash/wordpress.rb +21 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.1
|
data/lib/ash/wordpress.rb
CHANGED
@@ -65,7 +65,27 @@ configuration.load do
|
|
65
65
|
task :symlink, :roles => :web, :except => { :no_release => true } do
|
66
66
|
run "ln -nfs #{shared_path}/uploads #{current_release}/#{uploads_path}"
|
67
67
|
run "ln -nfs #{shared_path}/cache #{current_release}/wp-content/cache"
|
68
|
-
|
68
|
+
symlink_confg
|
69
|
+
end
|
70
|
+
|
71
|
+
desc <<-DESC
|
72
|
+
Symlink the environment-specific wp-config file \
|
73
|
+
where <ENV> is the environment being deployed to.
|
74
|
+
|
75
|
+
Expected patterns are one of the two following examples:
|
76
|
+
|
77
|
+
wp-config.<ENV>.php
|
78
|
+
wp-config.php.<ENV>
|
79
|
+
DESC
|
80
|
+
task :symlink_confg, :roles => :web, :except => { :no_release => true } do
|
81
|
+
case true
|
82
|
+
when remote_file_exists?("#{latest_release}/wp-config.#{stage}.php")
|
83
|
+
run "ln -nfs #{latest_release}/wp-config.#{stage}.php #{latest_release}/wp-config.php"
|
84
|
+
when remote_file_exists?("#{latest_release}/wp-config.php.#{stage}")
|
85
|
+
run "ln -nfs #{latest_release}/wp-config.php.#{stage} #{latest_release}/wp-config.php"
|
86
|
+
else
|
87
|
+
logger.important "Failed to symlink the wp-config.php file in #{latest_release} because an unknown pattern was used"
|
88
|
+
end
|
69
89
|
end
|
70
90
|
|
71
91
|
desc "Set URL in database"
|