From 9d1c55b1130b910bee164b2f1b48c0485248a860 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Wed, 7 Jan 2026 03:00:44 -0800 Subject: [PATCH] Simplify the jq command used to read version inside build_android (#55057) Summary: This is a pick of 4cac35f7d03f4000f100d3e98514b135422c37b6 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 , 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: https://github.com/facebook/react-native/pull/55057 Test Plan: N/A Reviewed By: fabriziocucci, alanleedev Differential Revision: D90189240 Pulled By: cortinico fbshipit-source-id: 9b1cd6ad6d37913f8a468892cedce5f808c8c33e --- .github/actions/build-android/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-android/action.yml b/.github/actions/build-android/action.yml index efd6ea96a70..89ca4c49b28 100644 --- a/.github/actions/build-android/action.yml +++ b/.github/actions/build-android/action.yml @@ -20,7 +20,7 @@ runs: shell: bash id: read-rn-version run: | - echo "rn-version=$(cat packages/react-native/package.json | jq -r 'version')" >> $GITHUB_OUTPUT + echo "rn-version=$(jq -r '.version' packages/react-native/package.json)" >> $GITHUB_OUTPUT - name: Set React Native Version # We don't want to set the version for stable branches, because this has been # already set from the 'create release' commits on the release branch.