From 85e0834d3acf45b2f837189ea57a49c320095336 Mon Sep 17 00:00:00 2001 From: Pedro Pombeiro Date: Wed, 21 Nov 2018 18:12:55 +0100 Subject: [PATCH] Fix `scripts/update-status-go.sh` so it updates right file and removes any `v` prefix --- modules/react-native-status/android/build.gradle | 4 +++- scripts/update-status-go.sh | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/react-native-status/android/build.gradle b/modules/react-native-status/android/build.gradle index 09baae7a07..8d9699dba1 100644 --- a/modules/react-native-status/android/build.gradle +++ b/modules/react-native-status/android/build.gradle @@ -27,8 +27,10 @@ dependencies { // Check if the local status-go jar exists, and compile against that if it does final String localStatusLibOutputDir = "${rootDir}/../modules/react-native-status/android/libs", localVersion = 'local' - if ( new File("${localStatusLibOutputDir}/${statusGoGroup}/${statusGoName}/${localVersion}/${statusGoName}-${localVersion}.aar").exists() ) { + final File localFile = new File("${localStatusLibOutputDir}/${statusGoGroup}/${statusGoName}/${localVersion}/${statusGoName}-${localVersion}.aar") + if ( localFile.exists() ) { // Use the local version + logger.warn("Using local build of Android status-go library ${localFile.absolutePath}.") statusGoVersion = localVersion } diff --git a/scripts/update-status-go.sh b/scripts/update-status-go.sh index dd6f058ef7..1848f7b403 100755 --- a/scripts/update-status-go.sh +++ b/scripts/update-status-go.sh @@ -26,6 +26,6 @@ if [ $# -eq 0 ]; then fi STATUSGO_VERSION=$1 +STATUSGO_VERSION=${STATUSGO_VERSION#"v"} -sedi "s/\([[:blank:]]\{28,\}\).*\(<\/version>\)/\1$STATUSGO_VERSION\2/" modules/react-native-status/ios/RCTStatus/pom.xml -sedi "s/\(statusGoVersion = '\).*\('\)/\1$STATUSGO_VERSION\2/" modules/react-native-status/android/build.gradle +echo $STATUSGO_VERSION > STATUS_GO_VERSION