releases/tools/add_teams_to_deliverable_files.sh
Doug Hellmann 9d12f20416 maintain team ownership info in the deliverable files
Teams add and remove repositories, change owners of repositories, and
are themselves removed over time. We can't rely on the current version
of the governance repository to include the information about who owned
a deliverable, so we need to put that information here in the releases
repository where we can track changes over time.

This patch adds support for a required "team" field to the deliverable
file, using the values set in previous patches in the series, and
updates the rendering code to use it instead of the project list from
the governance repository.

Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Change-Id: I5941072c641c05bf0983984cae29a34927246d86
2016-06-09 14:34:21 -04:00

27 lines
995 B
Bash
Executable File

#!/bin/sh
# 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.
# Try to add team fields to deliverable files that don't have them.
list-deliverables | while read team deliverable; do
for filename in deliverables/*/${deliverable}.yaml; do
if [ -f $filename ]; then
if grep -q '^team:' $filename; then
continue
fi
echo $filename
sed -i "/^launchpad:/a team: $team" $filename
fi
done
done