From db8fa7902c68c067c6aa13e7c1556b0c9cb13fdf Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Wed, 29 Aug 2018 10:08:39 -0700 Subject: [PATCH] Fix publish-android-snapshot issues Summary: As expected, this didn't work on the first try. Issues I've fixed: - Actually switch back to snapshots. - Use more widely compatible bash location. - Don't exit (because of `set -e`) if `grep` returns with status 1. Reviewed By: jknoxville Differential Revision: D9556770 fbshipit-source-id: 0900e6498e7fc8e16c941e77927005573ca310d5 --- gradle.properties | 2 +- scripts/publish-android-snapshot.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index a0feb1c7f..e276e7380 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # POM publishing constants -VERSION_NAME=0.6.18 +VERSION_NAME=0.6.19-SNAPSHOT GROUP=com.facebook.flipper POM_URL=https://github.com/facebook/flipper POM_SCM_URL=https://github.com/facebook/flipper.git diff --git a/scripts/publish-android-snapshot.sh b/scripts/publish-android-snapshot.sh index a0adf6fcd..266dcec90 100755 --- a/scripts/publish-android-snapshot.sh +++ b/scripts/publish-android-snapshot.sh @@ -1,8 +1,8 @@ -#!/usr/bin/bash +#!/usr/bin/env bash set -e BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" -IS_SNAPSHOT="$(grep 'VERSION_NAME=[0-9\.]\+-SNAPSHOT' "$BASEDIR/gradle.properties")" +IS_SNAPSHOT="$(grep 'VERSION_NAME=[0-9\.]\+-SNAPSHOT' "$BASEDIR/gradle.properties" || echo "")" if [ "$ANDROID_PUBLISH_KEY" == "" ]; then echo "No encryption key. Skipping snapshot deployment."