From 4713ddf8dfec0be33c581fb977d32941b0ca7ff8 Mon Sep 17 00:00:00 2001 From: davidair Date: Wed, 30 May 2018 11:53:51 -0400 Subject: Version updates for 5.2.0 (#1355) --- scripts/push-pods.sh | 4 ++-- scripts/update-tags.sh | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'scripts') diff --git a/scripts/push-pods.sh b/scripts/push-pods.sh index b79b76e..73d2f48 100755 --- a/scripts/push-pods.sh +++ b/scripts/push-pods.sh @@ -23,7 +23,7 @@ pod cache clean FirebaseCore --all #pod cache clean FirebaseAuth --all -pod cache clean FirebaseDatabase --all +#pod cache clean FirebaseDatabase --all pod cache clean FirebaseFirestore --all #pod cache clean FirebaseFunctions --all pod cache clean FirebaseMessaging --all @@ -31,7 +31,7 @@ pod cache clean FirebaseMessaging --all pod repo push cpdc-internal-spec FirebaseCore.podspec #pod repo push cpdc-internal-spec FirebaseAuth.podspec -pod repo push cpdc-internal-spec FirebaseDatabase.podspec +#pod repo push cpdc-internal-spec FirebaseDatabase.podspec pod repo push cpdc-internal-spec FirebaseFirestore.podspec --allow-warnings #pod repo push cpdc-internal-spec FirebaseFunctions.podspec pod repo push cpdc-internal-spec FirebaseMessaging.podspec diff --git a/scripts/update-tags.sh b/scripts/update-tags.sh index d321dd8..d5d5356 100755 --- a/scripts/update-tags.sh +++ b/scripts/update-tags.sh @@ -27,35 +27,35 @@ # Delete any existing tags at origin -git push --delete origin '5.1.0' -git push --delete origin 'Core-5.0.2' +git push --delete origin '5.2.0' +git push --delete origin 'Core-5.0.3' #git push --delete origin 'Auth-5.0.0' -git push --delete origin 'Database-5.0.1' -git push --delete origin 'Firestore-0.12.2' +#git push --delete origin 'Database-5.0.1' +git push --delete origin 'Firestore-0.12.3' #git push --delete origin 'Functions-2.0.0' -git push --delete origin 'Messaging-3.0.1' +git push --delete origin 'Messaging-3.0.2' #git push --delete origin 'Storage-3.0.0' # Delete local tags -git tag --delete '5.1.0' -git tag --delete 'Core-5.0.2' +git tag --delete '5.2.0' +git tag --delete 'Core-5.0.3' #git tag --delete 'Auth-5.0.0' -git tag --delete 'Database-5.0.1' -git tag --delete 'Firestore-0.12.2' +#git tag --delete 'Database-5.0.1' +git tag --delete 'Firestore-0.12.3' #git tag --delete 'Functions-2.0.0' -git tag --delete 'Messaging-3.0.1' +git tag --delete 'Messaging-3.0.2' #git tag --delete 'Storage-3.0.0' # Add and push the tags -git tag '5.1.0' -git tag 'Core-5.0.2' +git tag '5.2.0' +git tag 'Core-5.0.3' #git tag 'Auth-5.0.0' git tag 'Database-5.0.1' -git tag 'Firestore-0.12.2' +git tag 'Firestore-0.12.3' #git tag 'Functions-2.0.0' -git tag 'Messaging-3.0.1' +git tag 'Messaging-3.0.2' #git tag 'Storage-3.0.0' git push origin --tags -- cgit v1.2.3 From ed5c3217e89aafb25b6c11793cc0ab4a1c9d8d5c Mon Sep 17 00:00:00 2001 From: davidair Date: Wed, 30 May 2018 14:21:58 -0400 Subject: Fixing Messaging version, script (#1356) --- FirebaseMessaging.podspec | 2 +- scripts/update-tags.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/FirebaseMessaging.podspec b/FirebaseMessaging.podspec index bd0921b..00a3598 100644 --- a/FirebaseMessaging.podspec +++ b/FirebaseMessaging.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseMessaging' - s.version = '3.0.1' + s.version = '3.0.2' s.summary = 'Firebase Messaging for iOS' s.description = <<-DESC diff --git a/scripts/update-tags.sh b/scripts/update-tags.sh index d5d5356..47ffa13 100755 --- a/scripts/update-tags.sh +++ b/scripts/update-tags.sh @@ -52,7 +52,7 @@ git tag --delete 'Messaging-3.0.2' git tag '5.2.0' git tag 'Core-5.0.3' #git tag 'Auth-5.0.0' -git tag 'Database-5.0.1' +# git tag 'Database-5.0.1' git tag 'Firestore-0.12.3' #git tag 'Functions-2.0.0' git tag 'Messaging-3.0.2' -- cgit v1.2.3 From 196f5d28cc24a1d76752e0ba7ec5e862bcd073a6 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Wed, 30 May 2018 18:04:54 -0700 Subject: Add Auth 5.0.1 to Firebase 5.2.0 --- FirebaseAuth.podspec | 2 +- scripts/push-pods.sh | 4 ++-- scripts/update-tags.sh | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/FirebaseAuth.podspec b/FirebaseAuth.podspec index 48a9354..754e172 100644 --- a/FirebaseAuth.podspec +++ b/FirebaseAuth.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseAuth' - s.version = '5.0.0' + s.version = '5.0.1' s.summary = 'The official iOS client for Firebase Authentication (plus community support for macOS and tvOS)' s.description = <<-DESC diff --git a/scripts/push-pods.sh b/scripts/push-pods.sh index 73d2f48..ed34d79 100755 --- a/scripts/push-pods.sh +++ b/scripts/push-pods.sh @@ -22,7 +22,7 @@ # investigation. pod cache clean FirebaseCore --all -#pod cache clean FirebaseAuth --all +pod cache clean FirebaseAuth --all #pod cache clean FirebaseDatabase --all pod cache clean FirebaseFirestore --all #pod cache clean FirebaseFunctions --all @@ -30,7 +30,7 @@ pod cache clean FirebaseMessaging --all #pod cache clean FirebaseStorage --all pod repo push cpdc-internal-spec FirebaseCore.podspec -#pod repo push cpdc-internal-spec FirebaseAuth.podspec +pod repo push cpdc-internal-spec FirebaseAuth.podspec #pod repo push cpdc-internal-spec FirebaseDatabase.podspec pod repo push cpdc-internal-spec FirebaseFirestore.podspec --allow-warnings #pod repo push cpdc-internal-spec FirebaseFunctions.podspec diff --git a/scripts/update-tags.sh b/scripts/update-tags.sh index 47ffa13..d29fb5c 100755 --- a/scripts/update-tags.sh +++ b/scripts/update-tags.sh @@ -29,7 +29,7 @@ git push --delete origin '5.2.0' git push --delete origin 'Core-5.0.3' -#git push --delete origin 'Auth-5.0.0' +git push --delete origin 'Auth-5.0.1' #git push --delete origin 'Database-5.0.1' git push --delete origin 'Firestore-0.12.3' #git push --delete origin 'Functions-2.0.0' @@ -40,7 +40,7 @@ git push --delete origin 'Messaging-3.0.2' git tag --delete '5.2.0' git tag --delete 'Core-5.0.3' -#git tag --delete 'Auth-5.0.0' +git tag --delete 'Auth-5.0.1' #git tag --delete 'Database-5.0.1' git tag --delete 'Firestore-0.12.3' #git tag --delete 'Functions-2.0.0' @@ -51,7 +51,7 @@ git tag --delete 'Messaging-3.0.2' git tag '5.2.0' git tag 'Core-5.0.3' -#git tag 'Auth-5.0.0' +git tag 'Auth-5.0.1' # git tag 'Database-5.0.1' git tag 'Firestore-0.12.3' #git tag 'Functions-2.0.0' -- cgit v1.2.3 From 7dbf5caa5f25551658aee614247aed10012166e2 Mon Sep 17 00:00:00 2001 From: Gil Date: Wed, 6 Jun 2018 12:31:37 -0700 Subject: Fix support scripts on Linux (#1385) * Make it possible to run style.sh on Linux Needs clang-format in a nonstandard location, but can be made to work. * Fix lint.sh on Linux * Fix multiline comment error --- .../core/test/firebase/firestore/util/path_test.cc | 2 +- scripts/lint.sh | 18 ++++++++++-- scripts/style.sh | 34 +++++++++++++++++----- 3 files changed, 43 insertions(+), 11 deletions(-) (limited to 'scripts') diff --git a/Firestore/core/test/firebase/firestore/util/path_test.cc b/Firestore/core/test/firebase/firestore/util/path_test.cc index be8be1e..a60e839 100644 --- a/Firestore/core/test/firebase/firestore/util/path_test.cc +++ b/Firestore/core/test/firebase/firestore/util/path_test.cc @@ -38,7 +38,7 @@ namespace util { // // brew install llvm // llvm=$(brew --prefix)/opt/llvm -// $llvm/bin/clang++ -I$llvm/include -I$llvm/include/c++/v1 -L$llvm/lib \ +// $llvm/bin/clang++ -I$llvm/include -I$llvm/include/c++/v1 -L$llvm/lib // -Wl,-rpath,$llvm/lib test.cc -lc++experimental && ./a.out // // test.cc contains something like: diff --git a/scripts/lint.sh b/scripts/lint.sh index d474129..3d4f453 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -68,10 +68,21 @@ else command=(git ls-files) fi +# POSIX xargs is required to run commands at least once, but cpplint.py fails +# (with huge help text) if no files are supplied. Apple xargs avoids invocation +# if there are no arguments. Use a temporary file to avoid depending on/testing +# for this feature. +TEMP=$(mktemp -t lint-files-$$.XXXXXXXXXX) +trap "rm '$TEMP'" EXIT + # Straight C++ files get regular cpplint "${command[@]}" "${git_options[@]}" \ -- 'Firestore/core/**/*.'{h,cc} \ - | xargs -0 python scripts/cpplint.py --quiet 2>&1 + > "$TEMP" + +if [[ -s "$TEMP" ]]; then + xargs -0 python scripts/cpplint.py --quiet 2>&1 < "$TEMP" +fi CPP_STATUS=$? # Objective-C++ files get a looser cpplint @@ -79,7 +90,10 @@ CPP_STATUS=$? -- 'Firestore/Source/**/*.'{h,m,mm} \ 'Firestore/Example/Tests/**/*.'{h,m,mm} \ 'Firestore/core/**/*.mm' \ - | xargs -0 python scripts/cpplint.py "${objc_lint_options[@]}" --quiet 2>&1 + > "$TEMP" +if [[ -s "$TEMP" ]]; then + xargs -0 python scripts/cpplint.py "${objc_lint_options[@]}" --quiet 2>&1 < "$TEMP" +fi OBJC_STATUS=$? if [[ $CPP_STATUS != 0 || $OBJC_STATUS != 0 ]]; then diff --git a/scripts/style.sh b/scripts/style.sh index 8eff1e8..f82af77 100755 --- a/scripts/style.sh +++ b/scripts/style.sh @@ -21,18 +21,36 @@ # Commonly # ./scripts/style.sh master -system=$(uname -s) - +# Strip the clang-format version output down to the major version. Examples: +# clang-format version 7.0.0 (tags/google/stable/2018-01-11) +# clang-format version google3-trunk (trunk r333779) version=$(clang-format --version) + +# Remove leading "clang-format version" version="${version/*version /}" +# Remove trailing parenthetical version details +version="${version/ (*)/}" +# Remove everything after the first dot (note this is a glob, not a regex) version="${version/.*/}" -if [[ "$version" != 6 && "$version" != 7 ]]; then - # Allow an older clang-format to accommodate Travis version skew. - echo "Please upgrade to clang-format version 7." - echo "If it's installed via homebrew you can run: brew upgrade clang-format" - exit 1 -fi +case "$version" in + 6 | 7) + # Allow an older clang-format to accommodate Travis version skew. + ;; + google3-trunk) + echo "Please use a publicly released clang-format; a recent LLVM release" + echo "from http://releases.llvm.org/download.html will work." + echo "Prepend to PATH when running style.sh." + exit 1 + ;; + *) + echo "Please upgrade to clang-format version 7." + echo "If it's installed via homebrew you can run: brew upgrade clang-format" + exit 1 + ;; +esac + +system=$(uname -s) if [[ "$system" == "Darwin" ]]; then version=$(swiftformat --version) version="${version/*version /}" -- cgit v1.2.3