zend-patterns / ZendServerSDK

Pure ZF2 CLI for zpk creation and webapi client.
BSD 3-Clause "New" or "Revised" License
22 stars 17 forks source link

Support stamp version when using packZpk command #18

Closed minkbear closed 10 years ago

minkbear commented 10 years ago

support parameter (--version) of packZpk for replacing release version in deployment.xml before creating ZPK package

For example, If you want to change version number when creating package zpk. So the command will be like this below: php /usr/local/bin/zs-client.phar packZpk --folder='${project.basedir}' --destination='${project.basedir}' --name='application.zpk' --version='1.0.0.999'

This command will change version number in deployment.xml before creating zpk file.

slaff commented 10 years ago

Setting the version can also be done directly by editing the XML file. We do not want the tool to become also sort-of-xml editor. Can you give us good use case where this option can be helpful?

minkbear commented 10 years ago

@slaff OK. Let's say.

If your version number is in format like this:

<major>.<minor>.<patch>.<svn revision number> or <major>.<minor>.<patch>.<build number>

Because svn revision number or build number is come from the other system for example SVN or CI (Continuous Integration and build management server).

It is very hard to do:

It's the better way to do all by using continuous integration server, isn't it?

So the CI server run command to update version number and pack as ZPK package directly. So you don't worry to get svn revision number or build number and then manually edit version number directly in XML file any more. Just focus development.

Hope my explanation will make you clear.

Do you have any idea if you use version number format above?

slaff commented 10 years ago

Support form stamping of versions (#23) is merged in the master branch.