|
|
Re: Any way to insert SCM revision # as qualifier per plugin/feature not globall [message #48070 is a reply to message #37988] |
Wed, 25 February 2009 15:30 |
Chris Williams Messages: 29 Registered: July 2009 |
Junior Member |
|
|
Ketan Padegaonkar wrote:
> You'll need to execute svn info and get the last revision number of each
> plugin/feature[1] and replace the .qualifier from the MANIFEST.MF and
> feature.xml yourself with the svn revision number.
In the spirit of sharing, I did manage to get this to work. I added an ant
target prior to the build target that grabs all the directories inside the
plugins and features folder of the build directory, and then runs an SVN
info and sticks the last changed rev into the plugin/feature's
build.properties as the value of "qualifier". I used ant-contrib's for
task to iterate through, and a regexpreplace to replace
"qualifier\s*=\s*context" with "qualifier=${plugin.name.svn.rev}". The way
it works, it doesn't handle when the qualifier property doesn't already
exist (which is equivalent to setting qualifier to context), so I had to
make sure that line was in all the build.properties.
My guess is that a slightly better way would be to add this inside a
customTarget for the build, not as a postFetch, but as a
preWhateverComesNext (because postFetch doesn't get called if you don't
actually fetch source as part of the build, which we don't because we use
a continuous build machine).
> However you'll still need to increment the version number of your
> feature.xml if one of it's plugin version changes or the feature will
> not work off the 'update' site. I'm not sure how this can be achieved,
> so I've settled for global version numbers.
There's a handy PDE Build property for this:
"generateFeatureVersionSuffix=true". It generates a long suffix string of
gobble-dee-gook at the end of the feature and is supposed to increment as
the contents of the feature do. One thing to note is that the feature
needs a qualifier set (that means no "qualifier=none") or the suffix won't
get generated. Don't ask me why.
-Chris
|
|
|
|
Re: Any way to insert SCM revision # as qualifier per plugin/feature not globall [message #592337 is a reply to message #37988] |
Wed, 25 February 2009 15:30 |
Chris Williams Messages: 29 Registered: July 2009 |
Junior Member |
|
|
Ketan Padegaonkar wrote:
> You'll need to execute svn info and get the last revision number of each
> plugin/feature[1] and replace the .qualifier from the MANIFEST.MF and
> feature.xml yourself with the svn revision number.
In the spirit of sharing, I did manage to get this to work. I added an ant
target prior to the build target that grabs all the directories inside the
plugins and features folder of the build directory, and then runs an SVN
info and sticks the last changed rev into the plugin/feature's
build.properties as the value of "qualifier". I used ant-contrib's for
task to iterate through, and a regexpreplace to replace
"qualifier\s*=\s*context" with "qualifier=${plugin.name.svn.rev}". The way
it works, it doesn't handle when the qualifier property doesn't already
exist (which is equivalent to setting qualifier to context), so I had to
make sure that line was in all the build.properties.
My guess is that a slightly better way would be to add this inside a
customTarget for the build, not as a postFetch, but as a
preWhateverComesNext (because postFetch doesn't get called if you don't
actually fetch source as part of the build, which we don't because we use
a continuous build machine).
> However you'll still need to increment the version number of your
> feature.xml if one of it's plugin version changes or the feature will
> not work off the 'update' site. I'm not sure how this can be achieved,
> so I've settled for global version numbers.
There's a handy PDE Build property for this:
"generateFeatureVersionSuffix=true". It generates a long suffix string of
gobble-dee-gook at the end of the feature and is supposed to increment as
the contents of the feature do. One thing to note is that the feature
needs a qualifier set (that means no "qualifier=none") or the suffix won't
get generated. Don't ask me why.
-Chris
|
|
|
Powered by
FUDForum. Page generated in 0.03779 seconds