cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

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

아한
10-Marble

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

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?

3 REPLIES 3
kthierer
12-Amethyst
(To:아한)

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.

아한
10-Marble
(To:kthierer)

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

kthierer
12-Amethyst
(To:아한)

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

Announcements


Top Tags