Skip to content

Commit 9d1c55b

Browse files
cortinicometa-codesync[bot]
authored andcommitted
Simplify the jq command used to read version inside build_android (#55057)
Summary: This is a pick of 4cac35f inside `main`. The commit is already on the `0.84-stable` branch. The reasoning here is that `cat` + `jq` failed to run with: ``` Run echo "rn-version=$(cat packages/react-native/package.json | jq -r 'version')" >> $GITHUB_OUTPUT echo "rn-version=$(cat packages/react-native/package.json | jq -r 'version')" >> $GITHUB_OUTPUT shell: bash --noprofile --norc -e -o pipefail {0} jq: error: version/0 is not defined at <top-level>, line 1: version jq: 1 compile error ``` I'm moving to a single `jq` invocation as it's more resilient. ## Changelog: [INTERNAL] - Pull Request resolved: #55057 Test Plan: N/A Reviewed By: fabriziocucci, alanleedev Differential Revision: D90189240 Pulled By: cortinico fbshipit-source-id: 9b1cd6ad6d37913f8a468892cedce5f808c8c33e
1 parent 758a3db commit 9d1c55b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/actions/build-android/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ runs:
2020
shell: bash
2121
id: read-rn-version
2222
run: |
23-
echo "rn-version=$(cat packages/react-native/package.json | jq -r 'version')" >> $GITHUB_OUTPUT
23+
echo "rn-version=$(jq -r '.version' packages/react-native/package.json)" >> $GITHUB_OUTPUT
2424
- name: Set React Native Version
2525
# We don't want to set the version for stable branches, because this has been
2626
# already set from the 'create release' commits on the release branch.

0 commit comments

Comments
 (0)