Author Topic: get package version via sdk  (Read 561 times)

Offline vrishal

  • Full Member
  • ***
  • Posts: 10
  • Forum Citizenship: +1/-0
get package version via sdk
« on: 17 May 2010 01:34:43 pm »
Hi,
   I'm trying to get the version of a specific package via the sdk. The following is what I'm trying to achieve.

1. Check current package version that is deployed
2. Check version of new package in the deployment folder
3. If 2 is newer than 1 then deploy 2 using SDK.

Any help in how to find out the package information (and any of the meta-information about the package) will be highly appreciated.

Thank you

-V

Offline lindero

  • Community Leader
  • *****
  • Posts: 97
  • Forum Citizenship: +2/-0
Re: get package version via sdk
« Reply #1 on: 21 May 2010 07:16:06 pm »
Hello,

the package version don't differ by numbers. They have timestamps within their searchpaths. So you have to compare the timestamps.

hope this helps,
lindero
« Last Edit: 18 Aug 2010 12:13:42 am by lindero »

Offline xiska

  • Full Member
  • ***
  • Posts: 41
  • Forum Citizenship: +3/-0
Re: get package version via sdk
« Reply #2 on: 12 Jun 2010 03:30:57 pm »
Hi

History versions ot a package have a timestamp in the searchpath but not the current one.
I would try to get the version from the model itself. If you have a suitable value in the model.xml, which is 1:1 in the contentstore, you can use this one. This is just a little xml parsing to make your decision.

Greetings

Offline vrishal

  • Full Member
  • ***
  • Posts: 10
  • Forum Citizenship: +1/-0
Re: get package version via sdk
« Reply #3 on: 17 Jun 2010 05:11:27 am »
Quote
Hello,

the package version don't differ by numbers. They have timestamps within there searchpaths. So you have to compare the timestamps.

hope this helps,
lindero

Quote
Hi

History versions ot a package have a timestamp in the searchpath but not the current one.
I would try to get the version from the model itself. If you have a suitable value in the model.xml, which is 1:1 in the contentstore, you can use this one. This is just a little xml parsing to make your decision.

Greetings


Hi,
   Thanks for the reply guys. Although this is an inefficient way for me, I guess there is no other way.

Thanks once again.

-V