[JIRA] (JENKINS-15708) Xcode Plugin not expanding $(SRCROOT) variable

136 views
Skip to first unread message

dhowell@xmatters.com (JIRA)

unread,
Nov 2, 2012, 5:48:42 PM11/2/12
to jenkinsc...@googlegroups.com
Issue Type: Bug Bug
Affects Versions: current
Assignee: Unassigned
Components: xcode
Created: 02/Nov/12 9:48 PM
Description:

I am using the Xcode plugin to build my iOS App. I want to configure the plugin to set the Technical version of the app to e.g. r${SVN_REVISION}.

When I do this it doesn't work and I get the following in my console log. There is a myApp-Info.plist file in the myApp directory.

I have had similar problems around $(SRCROOT) when I ask the plugin to create the ipa file - the command line that is executed contains $(SRCROOT) literally without the variable being evaluated.

Started by user anonymous
Building in workspace /Users/Shared/Jenkins/Home/workspace/iOS-myApp
Updating svn://repository.invoqsystems.com/repository/apex/mobile/ios/trunk
At revision 56840
no change for svn://repository.invoqsystems.com/repository/apex/mobile/ios/trunk since the previous build
[iOS-myApp] $ /bin/sh -xe /var/folders/_b/vh7gd76s30j_pjy0g5mdzwvm00007b/T/hudson38657611056669647.sh

Working directory is /Users/Shared/Jenkins/Home/workspace/iOS-myApp.
[iOS-myApp] $ /usr/bin/xcodebuild -version
Xcode 4.5
Build version 4G182
Fetching marketing version number (CFBundleShortVersionString) from project.
[iOS-myApp] $ /usr/bin/agvtool mvers -terse1
Found marketing version (CFBundleShortVersionString): $(SRCROOT)/myApp/myApp-Info.plist
1.0.
Marketing version (CFBundleShortVersionString) found in project configuration: $(SRCROOT)/myApp/myApp-Info.plist
1.0.
Fetching technical version number (CFBundleVersion) from project.
[iOS-myApp] $ /usr/bin/agvtool vers -terse
No marketing version found (CFBundleVersion)
Technical version (CFBundleVersion) found in project configuration: .
Updating technical version (CFBundleVersion) to: r56831-b39
[iOS-myApp] $ /usr/bin/agvtool new-version -all r56831-b39
Setting version of project myApp to:
r56831-b39.

Also setting CFBundleVersion key (assuming it exists)

Updating CFBundleVersion in Info.plist(s)...

$(SRCROOT)/myApp/myApp-Info.plist
Cannot find "$(SRCROOT)/myApp/myApp-Info.plist"
Updated CFBundleVersion in "myApp.xcodeproj/../myAppUnitTests/myAppUnitTests-Info.plist" to r56831-b39

Marketing version (CFBundleShortVersionString) used by Jenkins to produce the IPA: $(SRCROOT)/myApp/myApp-Info.plist
1.0
Technical version (CFBundleVersion) used by Jenkins to produce the IPA: r56831-b39

Environment: OSX 10.8.1
Jenkins 1.488
Xcode Plugin 1.3.1
Project: Jenkins
Priority: Major Major
Reporter: David Howell
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

dhowell@xmatters.com (JIRA)

unread,
Nov 2, 2012, 6:52:42 PM11/2/12
to jenkinsc...@googlegroups.com
David Howell resolved Bug JENKINS-15708 as Not A Defect

Sorry - now see that this was an issue with my Xcode project and the plist.info settings

Change By: David Howell (02/Nov/12 10:52 PM)
Status: Open Resolved
Resolution: Not A Defect

mathiascaldas@gmail.com (JIRA)

unread,
Mar 11, 2013, 11:13:52 AM3/11/13
to jenkinsc...@googlegroups.com

Hi,
I am having the same issue, can you help me and tell me what was the problem here?

Thanks very much!

dhowell@xmatters.com (JIRA)

unread,
Mar 11, 2013, 3:38:53 PM3/11/13
to jenkinsc...@googlegroups.com

In my case I had to change the project setting for the location of the info.plist file from

$(SRCROOT)/myProject/myApp-Info.plist

to a relative path i.e.

myProject/myApp-info.plist

mathiascaldas@gmail.com (JIRA)

unread,
Mar 11, 2013, 3:58:52 PM3/11/13
to jenkinsc...@googlegroups.com

Hi,

Thanks for your answer.
That is the way u solved the issue creating the ipa?

Thanks!

dhowell@xmatters.com (JIRA)

unread,
Mar 11, 2013, 6:57:52 PM3/11/13
to jenkinsc...@googlegroups.com

I think so. Been a while but that's the only change I can see in the subversion logs.

nick.amundsen@gmail.com (JIRA)

unread,
Jun 3, 2013, 5:36:58 PM6/3/13
to jenkinsc...@googlegroups.com

I believe this is still an issue.

The issue seems to be exactly as described in the title in that the Xcode Plugin is not expanding the SRCROOT variable as it should.

While the comments above describe a workaround, providing the relative path to the info.plist is not always sufficient. It would be nice to be able to include a variable in the path of the info.plist and to have the plugin evaluate that variable to find the full path.

Another note here is that if you are using variables in your paths, the more appropriate syntax is "${SRCROOT}" rather than "$(SRCROOT)".

nick.amundsen@gmail.com (JIRA)

unread,
Jun 3, 2013, 5:38:57 PM6/3/13
to jenkinsc...@googlegroups.com
Change By: Nick Amundsen (03/Jun/13 9:37 PM)
Resolution: Not A Defect
Status: Resolved Reopened
Reply all
Reply to author
Forward
0 new messages