Skip to main content
1-Visitor
March 15, 2017
Question

How can I share a project by inputing 'label' ?

  • March 15, 2017
  • 1 reply
  • 2228 views

I do test using command line Interface.

si sharesubproject --hostname=%HOSTNAME% --port=%PORT% --user=%USER% --password=%PASSWORD% --cpid=%CP_ID% --project=/Target_project/project.pj --sharedProject=/Source_Sharedproject/project.pj --subprojectRevision=1.25 --type=build /Target_project/Source_Sharedproject/project.pj

"Source_Sharedproject" project is managing configuration through 'label'. (for example, 1.25 = ABC_function_bugfix-1.2.1)

So, my co-work and I want to use this CLI by using options label= 'ABC_function_bugfix-1.2.1' but I could not find those option in a help document.

Doesn't CLI 'si sharesubproject'  have a option for labels indeed?

1 reply

12-Amethyst
March 15, 2017

Just an idea

  si viewprojecthistory --project=/Source_Sharedproject/project.pj --rfilter=labeled:ABC_function_bugfix-1.2.1 --fields=revision,labels > tmpPjHistorySearch.txt

  si projectinfo --project=/Source_Sharedproject/project.pj --projectRevision=ABC_function_bugfix-1.2.1 > tmpPjInfo.txt

Parse tmpPjHistorySearch.txt  or tmpPjInfo.txt for the found project revision and build your 'si sharesubproject' command.

아한_011-VisitorAuthor
1-Visitor
March 15, 2017

Hi, thank you for your reply.

I develop CLI using batch. So do you know how can I get revision from tmpPjHistorySearch.txt?

I try your ideal and I don't have ideal how I can get 1.25 from this printed form. ㅠㅠ

/Source_Sharedproject/project.pj

1.25 ABC_function_bugfix-1.2.1

12-Amethyst
March 16, 2017

For me (using Intergity 10.4) I discovered something that is not documented directly in the reference for 'si sharesubproject':

--subprojectRevision can point to a label

Maybe there is a hint for this somewhere else in the reference guide.


si sharesubproject --hostname=%HOSTNAME% --port=%PORT% --user=%USER% --password=%PASSWORD% --cpid=%CP_ID% --project=/Target_project/project.pj --sharedProject=/Source_Sharedproject/project.pj --subprojectRevision=ABC_function_bugfix-1.2.1 --type=build /Target_project/Source_Sharedproject/project.pj

The internal logic for for this must be something like:

If subprojectRevision does not resemble a project revision number then it is a label and the command shall search the revision number by label.

Of course if you move that label you should not expect that your existing shares will follow

You would have to use "si configuresubproject" for that.

Regards Jürgen