Skip to content

Commit 70d82f1

Browse files
committed
.
1 parent 4278fc5 commit 70d82f1

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

.github/actions/setup-deps/action.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,21 @@ runs:
3838
if: inputs.react-version != '' && inputs.react-native-version != ''
3939
run: |
4040
RN_VERSION='${{ inputs.react-native-version }}'
41+
RN_MINOR="${RN_VERSION#0.}"
42+
RN_MINOR="${RN_MINOR%%.*}"
43+
4144
deps=(
4245
"react@${{ inputs.react-version }}"
4346
"@types/react@${{ inputs.react-version }}"
4447
"react-native@${RN_VERSION}"
4548
"@react-native/babel-preset@${RN_VERSION}"
4649
)
4750
48-
if [[ "$RN_VERSION" =~ ^0\.([0-9]+)\. ]] && (( BASH_REMATCH[1] >= 85 )); then
51+
if (( RN_MINOR >= 85 )); then
4952
deps+=("@react-native/jest-preset@${RN_VERSION}")
50-
yarn add -D "${deps[@]}"
5153
else
52-
yarn remove -D @react-native/jest-preset
53-
yarn add -D "${deps[@]}"
54+
yarn remove @react-native/jest-preset
5455
fi
56+
57+
yarn add -D "${deps[@]}"
5558
shell: bash

0 commit comments

Comments
 (0)