Buildr - sharing profile.yaml files across projects

The profiles file is a YAML file named profiles.yaml which you place in the same directory as the Buildfile

I was wondering if it is possible to use the same profile file for multiple projects i.e. to specify a different location where the profiles.yaml file can be found rather than the default for the same directory as the build file?

+3


source to share


2 answers


The solution I ended up with was to upload my own profile.yaml file:



require 'yaml'

def profile
  profiles = YAML.load_file('../../profiles.yaml')
  profiles[ENV['BUILDR_ENV']] ||= {}
end

puts "env:" << profile['propname']

      

+1


source


I'm afraid I have no satisfactory answer.

You can use git-submodules, braid, svn externals (or a regular old symlink) to do the trick.



Looking at the code, we are not allowing a different path for the profile file at this point.

If you would like this behavior to change, I would suggest that you enter an extension request for Buildr and consider providing a fix.

+1


source







All Articles