Skip to content

Instantly share code, notes, and snippets.

@voncannon
Last active August 29, 2015 14:15
Show Gist options
  • Save voncannon/a72e607d21314fd4f83d to your computer and use it in GitHub Desktop.
Save voncannon/a72e607d21314fd4f83d to your computer and use it in GitHub Desktop.
Passing Xcode Environment Variables to Jenkins
# Original Source: http://www.tuicool.com/articles/jMF773
# Another Source: https://groups.google.com/forum/#!topic/cocoaheadsau/FE5rr30ydBY
xcodebuild -showBuildSettings | \
sed -e '1d;s/^[ ]*/export /;s/ = \([^"].*\)/="\1"/;s/ = /=/;s/export UID.*//' > /tmp/xcodebuild-var.tmp
source /tmp/xcodebuild-var.tmp
rm /tmp/xcodebuild-var.tmp
# Example Usage
echo "======== ENVIRONMENT VARIABLES ========
echo "Wrapper Name: ${WRAPPER_NAME}"
echo "Build Dir: ${CONFIGURATION_BUILD_DIR}"
echo "======== ENVIRONMENT VARIABLES ========
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment