Closed brobie closed 10 years ago
Thanks Ben! :)
The commits are reverted for now because they are not compatible with Zend Studio. As Maurice correctly found:
So if in deployment.properties you have:
scripts.includes = scripts-deploy/post_stage.php
then the script is picked up from that directory, but in the zpk the file is packaged as:
scripts-deploy/post_stage.php
so the correct behaviour is to have the scripts dir in the deployment.properties file. But in that case I don't really understand how the
<scriptsdir>scripts-deploy</scriptsdir>
in deployment.xml is used... The way they implemented the fix actually makes more sense to me, but anyway.
So the fix is not consistent with Studio, to summarize the path needs to be both in the deployment.properties and in the xml. However where we did have a problem is that the SDK added the path again, resulting in something like:
scripts-deploy/scripts-deploy/post_stage.php
So another fix is needed I guess, and the correct format in deployment.properties is
scripts.include = scripts-deploy/post_stage.php, and not
scripts.include = post_stage.php
Brobie, please communicate with Maurice a better fix and then I will check it and merge it.
Sounds good - I will work with Maurice to find a better solution.
Pushed a change yesterday to match the value of scriptsdir defined in the XML file to strip it form the files defined in scriptsdir in deployment.properties. When the package is created the scripts get created properly.
however this means, as commented above, that scriptsdir.include should be defined this way:
scripts.include = scripts-deploy/post_stage.php
i.e. with the containing directory - this behaviour is consistent with that of Studio.
When the <scriptsdir> element was defined, it was creating the incorrect path within the .zpk file.
---- Previous Example 1 ---- deployment.xml: <scriptsdir>zenddeploymentscripts</scriptsdir>
deployment.properties: scriptsdir.includes = zenddeploymentscripts/post_stage.php
application.zpk path result: zenddeploymentscripts/zenddeploymentscripts/post_stage.php
---- Previous Example 2 ---- deployment.xml: <scriptsdir>zenddeploymentscripts</scriptsdir>
deployment.properties: scriptsdir.includes = post_stage.php
application.zpk path result: Errors, saying post_stage.php does not exist
---- After This Commit ---- deployment.xml: <scriptsdir>zenddeploymentscripts</scriptsdir>
deployment.properties: scriptsdir.includes = post_stage.php
application.zpk path result: zenddeploymentscripts/post_stage.php