Skip to content

Commit 1384d11

Browse files
committed
simplify validation
1 parent efb1965 commit 1384d11

File tree

1 file changed

+6
-24
lines changed

1 file changed

+6
-24
lines changed

action.yml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -68,30 +68,12 @@ runs:
6868
fi
6969
7070
if [ "${{ inputs.destination }}" == "device" ]; then
71-
if [ -z "${{ inputs.certificate-base64 }}" ]; then
72-
echo "Input 'certificate-base64' is required for device builds."
73-
exit 1
74-
fi
75-
76-
if [ -z "${{ inputs.certificate-password }}" ]; then
77-
echo " Input 'certificate-password' is required for device builds."
78-
exit 1
79-
fi
80-
81-
if [ -z "${{ inputs.provisioning-profile-base64 }}" ]; then
82-
echo "Input 'provisioning-profile-base64' is required for device builds."
83-
exit 1
84-
fi
85-
86-
if [ -z "${{ inputs.provisioning-profile-name }}" ]; then
87-
echo "Input 'provisioning-profile-name' is required for device builds."
88-
exit 1
89-
fi
90-
91-
if [ -z "${{ inputs.keychain-password }}" ]; then
92-
echo "Input 'keychain-password' is required for device builds."
93-
exit 1
94-
fi
71+
for input in "certificate-base64" "certificate-password" "provisioning-profile-base64" "provisioning-profile-name" "keychain-password"; do
72+
if [ -z "${{ inputs[input] }}" ]; then
73+
echo "Input '$input' is required for device builds."
74+
exit 1
75+
fi
76+
done
9577
fi
9678
shell: bash
9779

0 commit comments

Comments
 (0)