File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -171,9 +171,27 @@ function isOnAReleaseBranch() {
171171 ) ;
172172}
173173
174+ function isOnAReleaseTag ( ) {
175+ try {
176+ // If on a named tag, this method will return the tag name.
177+ // If not, it will throw as the return code is not 0.
178+ execSync ( 'git describe --exact-match HEAD' , { stdio : 'ignore' } ) ;
179+ } catch ( error ) {
180+ return false ;
181+ }
182+ let currentRemote = execSync ( 'git config --get remote.origin.url' )
183+ . toString ( )
184+ . trim ( ) ;
185+ return currentRemote . endsWith ( 'facebook/react-native.git' ) ;
186+ }
187+
174188function shouldBuildHermesFromSource ( ) {
175189 const hermesTag = readHermesTag ( ) ;
176- return isOnAReleaseBranch ( ) || hermesTag === DEFAULT_HERMES_TAG ;
190+ return (
191+ isOnAReleaseBranch ( ) ||
192+ isOnAReleaseTag ( ) ||
193+ hermesTag === DEFAULT_HERMES_TAG
194+ ) ;
177195}
178196
179197function shouldUsePrebuiltHermesC ( os ) {
You can’t perform that action at this time.
0 commit comments