blob: 113f45be2603bbd1438c009e0338622100081c49 [file] [log] [blame]
Yufeng Wang14b538c2023-01-20 19:39:54 -08001#!/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
19cd /tmp
20rm -rf connectedhomeip
21git clone --recurse-submodules https://github.com/project-chip/connectedhomeip.git
22cd connectedhomeip
23./scripts/build_coverage.sh 2>&1 | tee /tmp/matter_build.log
24cd out/coverage/coverage
25gcloud app deploy webapp_config.yaml 2>&1 | tee /tmp/matter_publish.log
26versions=$(gcloud app versions list \
27 --service default \
28 --sort-by '~VERSION.ID' \
29 --format 'value(VERSION.ID)' | sed 1,5d)
30for version in "$versions"; do
31 gcloud app versions delete "$version" \
32 --service default \
33 --quiet
34done