CrazyAwesomeCompany / autophing

Automatic Phing targets
13 stars 4 forks source link

Make sure that cronfiles are also filtered with expandproperties if run under sudo #6

Closed RobQuistNL closed 10 years ago

RobQuistNL commented 10 years ago

We noticed that cronfiles copied using the sudo method were not replace (which is rather logical).

This way they are first copied to a temporary directory in order to replace the variables in the files, then copied from there to the cron directory under sudo user.

@ngroot :)

RobQuistNL commented 10 years ago

OK, more votes for that solution, i'll do that.

RobQuistNL commented 10 years ago

I've been searching but can't really find anything for this.

I've tried; replacetokens - Don't exist in phing replace - Doesn't exist either

<target name="cron-replace-params">
        <replaceregexp match="\${(.*?)}" replace="${\1}">
            <fileset dir="${cron.files}">
                <include name="${project.app}-${project.environment}-*" />
            </fileset>
        </replaceregexp>
    </target>

Seems to not parse the token in the replace path - thus not actually doing anything.

Is there any other way to replace all tokens in files that you know of? Otherwise this actually has to be the solution.

Or, copy to tmp dir with filterchain, copy back to repo, then execute other phing tasks.. @NickBelhomme @jvandijk

NickBelhomme commented 10 years ago

I would go for this solution: https://github.com/CrazyAwesomeCompany/autophing/pull/7 This PR can be closed.