aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Paul Beusterien <paulbeusterien@google.com>2018-05-09 19:23:38 -0700
committerGravatar GitHub <noreply@github.com>2018-05-09 19:23:38 -0700
commit53b866443995ed8e796246d1f22a6fe47f76be6b (patch)
tree897042336f2e4df0ec77cf95711946c95c301990 /scripts
parentfb6f930f7beea29129cea89896d8ab874316ecbe (diff)
Add back pod spec lint checking (#1252)
* Add back pod spec lint checking * Separate pod lib lint to stages * order unit tests before lints * add lint to install_prereqs and remove default * consolidate pod_install and install_prereqs scripts * workaround travis 10 minute timeout for Firestore lint
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/if_changed.sh2
-rwxr-xr-xscripts/install_prereqs.sh34
-rwxr-xr-xscripts/pod_install.sh54
3 files changed, 26 insertions, 64 deletions
diff --git a/scripts/if_changed.sh b/scripts/if_changed.sh
index 697cad2..3bc2a65 100755
--- a/scripts/if_changed.sh
+++ b/scripts/if_changed.sh
@@ -49,7 +49,7 @@ else
check_changes '^(Firebase|Functions|Example)'
;;
- Firestore-xcodebuild)
+ Firestore-xcodebuild|Firestore-pod-lib-lint)
check_changes '^Firestore'
;;
diff --git a/scripts/install_prereqs.sh b/scripts/install_prereqs.sh
index c86663f..c943369 100755
--- a/scripts/install_prereqs.sh
+++ b/scripts/install_prereqs.sh
@@ -19,28 +19,44 @@
# - PROJECT - Firebase or Firestore
# - METHOD - xcodebuild or cmake; default is xcodebuild
-if [[ -z "$METHOD" ]]; then
- METHOD="xcodebuild"
-fi
+bundle install
-case "$PROJECT-$METHOD" in
- *-xcodebuild)
- bundle install
+case "$PROJECT-$PLATFORM-$METHOD" in
+ Firebase-iOS-xcodebuild)
gem install xcpretty
+ bundle exec pod install --project-directory=Example --repo-update
+ bundle exec pod install --project-directory=Functions/Example
;;
- Firestore-cmake)
- bundle install
+ Firebase-*-xcodebuild)
+ gem install xcpretty
+ bundle exec pod install --project-directory=Example --repo-update
+ ;;
+
+ Firestore-*-xcodebuild)
+ gem install xcpretty
+ bundle exec pod install --project-directory=Firestore/Example --repo-update
+ ;;
+
+ *-pod-lib-lint)
+ bundle exec pod repo update
+ ;;
+
+ Firestore-*-cmake)
# xcpretty is helpful for the intermediate step which builds FirebaseCore
# using xcodebuild.
gem install xcpretty
brew outdated cmake || brew upgrade cmake
brew outdated go || brew upgrade go # Somehow the build for Abseil requires this.
+ bundle exec pod install --project-directory=Example --repo-update
+ bundle exec pod install --project-directory=Firestore/Example \
+ --no-repo-update
;;
*)
- echo "Unknown project-method combo" 1>&2
+ echo "Unknown project-platform-method combo" 1>&2
echo " PROJECT=$PROJECT" 1>&2
+ echo " PLATFORM=$PLATFORM" 1>&2
echo " METHOD=$METHOD" 1>&2
exit 1
;;
diff --git a/scripts/pod_install.sh b/scripts/pod_install.sh
deleted file mode 100755
index ff5ec96..0000000
--- a/scripts/pod_install.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 2018 Google
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Within Travis, installs prerequisites for a build.
-
-# Examines the following configured environment variables that should be
-# specified in an env: block
-# - PROJECT - Firebase or Firestore
-# - METHOD - xcodebuild or cmake; default is xcodebuild
-# - PLATFORM - iOS, macOS, or tvOS
-
-if [[ -z "$METHOD" ]]; then
- METHOD="xcodebuild"
-fi
-
-case "$PROJECT-$METHOD-$PLATFORM" in
- Firebase-xcodebuild-iOS)
- bundle exec pod install --project-directory=Example --repo-update
- bundle exec pod install --project-directory=Functions/Example
- ;;
-
- Firebase-xcodebuild-*)
- bundle exec pod install --project-directory=Example --repo-update
- ;;
-
- Firestore-xcodebuild-*)
- bundle exec pod install --project-directory=Firestore/Example --repo-update
- ;;
-
- Firestore-cmake-*)
- bundle exec pod install --project-directory=Example --repo-update
- bundle exec pod install --project-directory=Firestore/Example \
- --no-repo-update
- ;;
-
- *)
- echo "Unknown project-method combo" 1>&2
- echo " PROJECT=$PROJECT" 1>&2
- echo " METHOD=$METHOD" 1>&2
- exit 1
- ;;
-esac
-