Yufeng Wang | 14b538c | 2023-01-20 19:39:54 -0800 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | # |
| 4 | # Copyright (c) 2023 Project CHIP Authors |
| 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | # |
| 18 | |
| 19 | cd /tmp |
| 20 | rm -rf connectedhomeip |
| 21 | git clone --recurse-submodules https://github.com/project-chip/connectedhomeip.git |
| 22 | cd connectedhomeip |
| 23 | ./scripts/build_coverage.sh 2>&1 | tee /tmp/matter_build.log |
| 24 | cd out/coverage/coverage |
| 25 | gcloud app deploy webapp_config.yaml 2>&1 | tee /tmp/matter_publish.log |
| 26 | versions=$(gcloud app versions list \ |
| 27 | --service default \ |
| 28 | --sort-by '~VERSION.ID' \ |
| 29 | --format 'value(VERSION.ID)' | sed 1,5d) |
| 30 | for version in "$versions"; do |
| 31 | gcloud app versions delete "$version" \ |
| 32 | --service default \ |
| 33 | --quiet |
| 34 | done |