doc/pages/settings_profiles.textile in vic-buildr-1.3.3 vs doc/pages/settings_profiles.textile in vic-buildr-1.3.4
- old
+ new
@@ -199,11 +199,11 @@
Here's a simple example for handling different environments within the Buildfile:
{{{!ruby
project 'db-module' do
db = (environment == 'production' ? 'oracle' : 'hsql')
- resources.from(_(:source, :main, db))
+ resources.from(_("src/main/#{db}"))
end
}}}
We recommend picking a convention for your different environments and following it across all your projects. For example:
@@ -242,10 +242,10 @@
{{{!ruby
project 'db-module' do
# Copy SQL files specific for the database we're using,
# for example, everything under src/main/hsql.
- resources.from(_(:source, :main, profile['db']))
+ resources.from(_("src/main/#{Buildr.settings.profile['db']}"))
# Set the JDBC URL in copied resource files (config.xml needs this).
resources.filter :jdbc=>profile['jdbc']
end
}}}