chucknorris / uppercut

UppercuT - Professional builds in moments, not days!
http://projectuppercut.org
68 stars 17 forks source link

file_is_for_settings method depends on filenames starting with environment string #6

Closed janv8000 closed 12 years ago

janv8000 commented 12 years ago

Revert "When moving files to environment.files do not add environment label to filenames if a specific environment subfolder is being used"

This reverts commit 1e6e55bad3055d2d956a27d2bd46f0b06c33f30b.

file_is_for_settings method depends on filenames starting with environment string

janv8000 commented 12 years ago

The build was no longer replacing the template values :(

When templating only files with a filename starting with the environement token (ie. settings_name in the snippet below) get treated by the TokenReplacer.

    private static bool file_is_for_settings(string file_name, string settings_name)
    {
        return settings_name.to_lower() == file_name.Substring(0, file_name.IndexOf('.')).to_lower();
    }
ferventcoder commented 12 years ago

Perhaps they could be renamed post template replacement. Or as part of template replacement.

janv8000 commented 12 years ago

Renaming them post replacement sounds good, I'll look into it