Fix `scripts/update-status-go.sh` so it updates right file and removes any `v` prefix

This commit is contained in:
Pedro Pombeiro 2018-11-21 18:12:55 +01:00
parent 57ef0b2ba3
commit 85e0834d3a
No known key found for this signature in database
GPG Key ID: A65DEB11E4BBC647
2 changed files with 5 additions and 3 deletions

View File

@ -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
}

View File

@ -26,6 +26,6 @@ if [ $# -eq 0 ]; then
fi
STATUSGO_VERSION=$1
STATUSGO_VERSION=${STATUSGO_VERSION#"v"}
sedi "s/\([[:blank:]]\{28,\}<version>\).*\(<\/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