Skip to content

Commit

Permalink
CI Script reorg (#855)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 committed Dec 27, 2019
1 parent c6367b7 commit 07ca52c
Show file tree
Hide file tree
Showing 23 changed files with 331 additions and 32 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ Pods/
xcuserdata/
*.xcworkspace/
GoogleService-Info.plist
Secrets
Secrets.tar
12 changes: 2 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,10 @@ before_install:
- bundle install
- gem install xcpretty
- bundle exec pod install --repo-update
- cp ../mock-GoogleService-Info.plist ./GoogleService-Info.plist
- sed -i '' '/<key>BUNDLE_ID</{n;s/id/com.google.firebase.quickstart.${SAMPLE}Example/;}' GoogleService-Info.plist
- gem install xcodeproj
- ruby ../info_script.rb $SAMPLE
- ../scripts/install_prereqs/$SAMPLE.sh
- cd -
- sed -i '' 's#DYNAMIC_LINK_DOMAIN#https://qpf6m.app.goo.gl#' dynamiclinks/DynamicLinksExample/DynamicLinksExample.entitlements
- sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' dynamiclinks/DynamicLinksExample/ViewController.m
- sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-qkaflmcjc2mlfb7r5n0pda5eejdpi36t/' authentication/AuthenticationExample/Info.plist
- sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' functions/FunctionsExample/Info.plist
- ./scripts/install_secrets.sh

script: travis_retry ./test.sh
script: travis_retry ./scripts/test.sh

branches:
only:
Expand Down
16 changes: 0 additions & 16 deletions info_script.rb

This file was deleted.

32 changes: 32 additions & 0 deletions scripts/info_script.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env ruby

# Copyright 2019 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.

require 'xcodeproj'
sample = ARGV[0]
project_path = "#{sample}Example.xcodeproj"
project = Xcodeproj::Project.open(project_path)

# Add a file to the project in the main group
file_name = 'GoogleService-Info.plist'
file = project.new_file(file_name)

# Add the file to the all targets
project.targets.each do |target|
target.add_file_references([file])
end

#save project
project.save()
17 changes: 17 additions & 0 deletions scripts/install_prereqs/abtesting.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2019 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.

ruby ../scripts/info_script.rb ABTesting
../scripts/install_secrets.sh
cp Secrets/quickstart-ios/abtesting/GoogleService-Info.plist ./
17 changes: 17 additions & 0 deletions scripts/install_prereqs/admob.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2019 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.

ruby ../scripts/info_script.rb AdMob
../scripts/install_secrets.sh
cp Secrets/quickstart-ios/admob/GoogleService-Info.plist ./
17 changes: 17 additions & 0 deletions scripts/install_prereqs/analytics.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2019 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.

ruby ../scripts/info_script.rb Analytics
../scripts/install_secrets.sh
cp Secrets/quickstart-ios/analytics/GoogleService-Info.plist ./
18 changes: 18 additions & 0 deletions scripts/install_prereqs/authentication.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2019 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.

ruby ../scripts/info_script.rb Authentication
../scripts/install_secrets.sh
cp Secrets/quickstart-ios/authentication/GoogleService-Info.plist ./
sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-qkaflmcjc2mlfb7r5n0pda5eejdpi36t/' AuthenticationExample/Info.plist
17 changes: 17 additions & 0 deletions scripts/install_prereqs/config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2019 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.

ruby ../scripts/info_script.rb Config
../scripts/install_secrets.sh
cp Secrets/quickstart-ios/config/GoogleService-Info.plist ./
17 changes: 17 additions & 0 deletions scripts/install_prereqs/crashlytics.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2019 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.

ruby ../scripts/info_script.rb Crashlytics
../scripts/install_secrets.sh
cp Secrets/quickstart-ios/crashlytics/GoogleService-Info.plist ./
17 changes: 17 additions & 0 deletions scripts/install_prereqs/database.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2019 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.

ruby ../scripts/info_script.rb Database
../scripts/install_secrets.sh
cp Secrets/quickstart-ios/database/GoogleService-Info.plist ./
19 changes: 19 additions & 0 deletions scripts/install_prereqs/dynamiclinks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2019 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.

ruby ../scripts/info_script.rb DynamicLinks
../scripts/install_secrets.sh
cp Secrets/quickstart-ios/dynamiclinks/GoogleService-Info.plist ./
sed -i '' 's#DYNAMIC_LINK_DOMAIN#https://qpf6m.app.goo.gl#' DynamicLinksExample/DynamicLinksExample.entitlements
sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' DynamicLinksExample/ViewController.m
17 changes: 17 additions & 0 deletions scripts/install_prereqs/firestore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2019 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.

ruby ../scripts/info_script.rb Firestore
../scripts/install_secrets.sh
cp Secrets/quickstart-ios/firestore/GoogleService-Info.plist ./
18 changes: 18 additions & 0 deletions scripts/install_prereqs/functions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2019 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.

ruby ../scripts/info_script.rb Functions
../scripts/install_secrets.sh
cp Secrets/quickstart-ios/functions/GoogleService-Info.plist ./
sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' FunctionsExample/Info.plist
17 changes: 17 additions & 0 deletions scripts/install_prereqs/inappmessaging.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2019 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.

ruby ../scripts/info_script.rb InAppMessaging
../scripts/install_secrets.sh
cp Secrets/quickstart-ios/inappmessaging/GoogleService-Info.plist ./
17 changes: 17 additions & 0 deletions scripts/install_prereqs/installations.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2019 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.

cp ../mock-GoogleService-Info.plist ./GoogleService-Info.plist
ruby ../scripts/info_script.rb Installations
sed -i '' '/<key>BUNDLE_ID</{n;s/id/com.google.firebase.quickstart.Installations/;}' GoogleService-Info.plist
17 changes: 17 additions & 0 deletions scripts/install_prereqs/messaging.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2019 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.

ruby ../scripts/info_script.rb Messaging
../scripts/install_secrets.sh
cp Secrets/quickstart-ios/messaging/GoogleService-Info.plist ./
17 changes: 17 additions & 0 deletions scripts/install_prereqs/mlmodelinterpreter.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2019 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.

ruby ../scripts/info_script.rb MLModelInterpreter
cp ../mock-GoogleService-Info.plist ./GoogleService-Info.plist
sed -i '' '/<key>BUNDLE_ID</{n;s/id/com.google.firebase.quickstart.MLModelInterpreterExample/;}' GoogleService-Info.plist
17 changes: 17 additions & 0 deletions scripts/install_prereqs/mlvision.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2019 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.

cp ../mock-GoogleService-Info.plist ./GoogleService-Info.plist
sed -i '' '/<key>BUNDLE_ID</{n;s/id/com.google.firebase.quickstart.MLVisionExample/;}' GoogleService-Info.plist
ruby ../scripts/info_script.rb MLVision
17 changes: 17 additions & 0 deletions scripts/install_prereqs/performance.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2019 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.

ruby ../scripts/info_script.rb Performance
../scripts/install_secrets.sh
cp Secrets/quickstart-ios/performance/GoogleService-Info.plist ./
17 changes: 17 additions & 0 deletions scripts/install_prereqs/storage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2019 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.

ruby ../scripts/info_script.rb Storage
../scripts/install_secrets.sh
cp Secrets/quickstart-ios/storage/GoogleService-Info.plist ./
Loading

0 comments on commit 07ca52c

Please sign in to comment.