Skip to content

Commit 81a9892

Browse files
committed
is_clean_build option added + minimal configs log format revision/improvement
1 parent 47a2f63 commit 81a9892

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

bitrise.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ workflows:
1818
steps:
1919
- path::./:
2020
inputs:
21-
- is_force_code_sign: "yes"
21+
- is_force_code_sign: "no"
22+
- is_clean_build: "no"
2223
- script:
2324
title: Output (generated by the Step) tests
2425
inputs:

step.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ fi
7171

7272
#
7373
# Print configs
74+
echo
75+
echo "========== Configs =========="
7476
echo " * CONFIG_xcode_project_action: ${CONFIG_xcode_project_action}"
7577
echo " * project_path: ${project_path}"
7678
echo " * scheme: ${scheme}"
@@ -80,6 +82,7 @@ echo " * archive_path: ${archive_path}"
8082
echo " * ipa_path: ${ipa_path}"
8183
echo " * dsym_zip_path: ${dsym_zip_path}"
8284
echo " * is_force_code_sign: ${is_force_code_sign}"
85+
echo " * is_clean_build: ${is_clean_build}"
8386

8487
if [ ! -z "${export_options_path}" ] ; then
8588
echo " * export_options_path: ${export_options_path}"
@@ -91,6 +94,11 @@ if [ ! -z "${workdir}" ] ; then
9194
cd "${workdir}"
9295
fi
9396

97+
clean_build_param=''
98+
if [[ "${is_clean_build}" == "yes" ]] ; then
99+
clean_build_param='clean'
100+
fi
101+
94102

95103
#
96104
# Cleanup function
@@ -124,15 +132,15 @@ if [[ "${is_force_code_sign}" == "yes" ]] ; then
124132
set -v
125133
xcodebuild ${CONFIG_xcode_project_action} "${project_path}" \
126134
-scheme "${scheme}" \
127-
clean archive -archivePath "${archive_path}" \
135+
${clean_build_param} archive -archivePath "${archive_path}" \
128136
-verbose \
129137
PROVISIONING_PROFILE="${BITRISE_PROVISIONING_PROFILE_ID}" \
130138
CODE_SIGN_IDENTITY="${BITRISE_CODE_SIGN_IDENTITY}"
131139
else
132140
set -v
133141
xcodebuild ${CONFIG_xcode_project_action} "${project_path}" \
134142
-scheme "${scheme}" \
135-
clean archive -archivePath "${archive_path}" \
143+
${clean_build_param} archive -archivePath "${archive_path}" \
136144
-verbose
137145
fi
138146

step.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@ inputs:
8888
is_required: true
8989
is_expand: false
9090
is_dont_change_value: false
91+
- is_clean_build: "yes"
92+
opts:
93+
title: "Do a clean Xcode build before the archive?"
94+
value_options:
95+
- "yes"
96+
- "no"
97+
is_required: true
98+
is_expand: true
99+
is_dont_change_value: false
91100
outputs:
92101
- BITRISE_IPA_PATH:
93102
opts:

0 commit comments

Comments
 (0)