Skip to content

Commit fdabae8

Browse files
committed
Merge pull request #34 from bitrise-io/export_app_dir
print xcodebuild full version, export .app directory
2 parents e8cdd40 + 085e6ab commit fdabae8

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

bitrise.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ workflows:
4848
inputs:
4949
- content: |-
5050
echo "-> BITRISE_IPA_PATH: ${BITRISE_IPA_PATH}"
51+
echo "-> BITRISE_APP_DIR_PATH: ${BITRISE_APP_DIR_PATH}"
5152
echo "-> BITRISE_DSYM_PATH: ${BITRISE_DSYM_PATH}"
52-
echo "-> BITRISE_DSYM_PATH: ${BITRISE_XCARCHIVE_PATH}"
53+
echo "-> BITRISE_XCARCHIVE_PATH: ${BITRISE_XCARCHIVE_PATH}"
5354
5455
# ----------------------------------------------------------------
5556
# --- workflows to create Release

step.sh

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ validate_required_input_with_options "is_force_code_sign" $is_force_code_sign "$
112112
validate_required_input_with_options "is_clean_build" $is_clean_build "${options[@]}"
113113
validate_required_input_with_options "is_export_xcarchive_zip" $is_export_xcarchive_zip "${options[@]}"
114114

115-
116115
# Detect Xcode major version
117116
xcode_major_version=""
118117
major_version_regex="Xcode ([0-9]).[0-9]"
@@ -124,8 +123,13 @@ fi
124123
if [ "${xcode_major_version}" -lt "6" ] ; then
125124
echo_fail "Invalid xcode major version: ${xcode_major_version}, should be greater then 6"
126125
fi
127-
echo_details "* xcode_major_version: ${xcode_major_version}"
128126

127+
IFS=$'\n'
128+
xcodebuild_version_split=($out)
129+
unset IFS
130+
131+
xcodebuild_version="${xcodebuild_version_split[0]} (${xcodebuild_version_split[1]})"
132+
echo_details "* xcodebuild_version: $xcodebuild_version"
129133

130134
# Detect xcpretty version
131135
xcpretty_version=""
@@ -372,7 +376,25 @@ fi
372376
# Export *.ipa path
373377
envman add --key BITRISE_IPA_PATH --value "${ipa_path}"
374378
echo_done 'The IPA path is now available in the Environment Variable: $BITRISE_IPA_PATH'
375-
echo
379+
380+
#
381+
# Export app directory
382+
echo_info "Exporting .app directory..."
383+
384+
IFS=$'\n'
385+
app_directory=""
386+
for a_app_directory in $(find "${archive_path}/Products/Applications" -type d -name '*.app')
387+
do
388+
echo " * a_app_directory: ${a_app_directory}"
389+
if [ ! -z "${app_directory}" ] ; then
390+
echo_warn "More than one \`.app directory\` found in \`${archive_path}/Products/Applications\`"
391+
fi
392+
app_directory="${a_app_directory}"
393+
done
394+
unset IFS
395+
396+
envman add --key BITRISE_APP_DIR_PATH --value "${app_directory}"
397+
echo_done 'The .app directory is now available in the Environment Variable: $BITRISE_APP_DIR_PATH'
376398

377399
#
378400
# dSYM handling

step.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ outputs:
136136
- BITRISE_IPA_PATH:
137137
opts:
138138
title: The created .ipa file's path
139+
- BITRISE_APP_DIR_PATH:
140+
opts:
141+
title: The generated .app directory
139142
- BITRISE_DSYM_PATH:
140143
opts:
141144
title: The created .dSYM.zip file's path

0 commit comments

Comments
 (0)