Skip to content

Setting Name Token Replacement

ferventcoder edited this page Jun 9, 2011 · 5 revisions

If a setting can resolve to a string value, then you can use the token replacement when setting up your deployment configuration.

DropkicK will replace a settings name with the value if you include it in a string with the value between two brackets {{}} (i.e. {{Environment}}).

s.CopyFile(@"..\environment.files\{{Environment}}\{{Environment}}.web.config").ToDirectory(@"{{WebsitePath}}").RenameTo(@"web.config");

would become

s.CopyFile(@"..\environment.files\DEV\DEV.web.config").ToDirectory(@"~\web\appLocation").RenameTo(@"web.config");

when
settings.Environment = 'DEV'
settings.WebsitePath = '~\web\appLocation'

Clone this wiki locally