File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
# this is a capistrano recipe that will use the templated version.yml.erb
2
- # to produce the actual version.yml that the app_version plugin uses to
2
+ # to produce the actual version.yml that the app_version plugin uses to
3
3
# store version information.
4
4
5
5
namespace :app_version do
6
6
7
7
desc "Generate version.yml from variables"
8
8
task :generate_version_info , :roles => :app do
9
- template = File . read ( "lib/templates/version.yml.erb" )
10
- result = ERB . new ( template ) . result ( binding )
11
- put result , "#{ release_path } /config/version.yml"
9
+ if File . exist? ( "lib/templates/version.yml.erb" )
10
+ template = File . read ( "lib/templates/version.yml.erb" )
11
+ result = ERB . new ( template ) . result ( binding )
12
+ put result , "#{ release_path } /config/version.yml"
13
+ end
12
14
end
13
15
after "deploy:update_code" , "app_version:generate_version_info"
14
16
You can’t perform that action at this time.
0 commit comments