2 # @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
3 ##############################################################################
4 # Copyright (c) 2017 The Linux Foundation and others.
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
12 MILESTONE_STATUS_DIR="release-process/milestone-readouts/status"
13 mkdir -p "$MILESTONE_STATUS_DIR"
15 trim_trailing_whitespace() {
16 sed -e 's/[[:space:]]*$//'
19 trim_leading_and_trailing_whitespace() {
20 sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
24 echo "Milestone 0 Status"
25 echo "=================="
27 echo ".. list-table:: Milestone 0 Status"
29 echo " :header-rows: 1"
31 echo " * - Project ID"
38 echo " - Committers Updated"
40 files=($(find release-process/milestone-readouts/m0 -type f | sort))
41 for f in ${files[@]}; do
42 project="$(basename $f | awk -F. '{print $1}')"
43 offset=$(grep 'Project Offset:' "$f" | awk -F: '{print $2}' | trim_leading_and_trailing_whitespace)
44 category=$(grep 'Project Category:' "$f" | awk -F: '{print $2}' | trim_leading_and_trailing_whitespace)
45 labels=$(grep 'Project Labels:' "$f" | awk -F: '{print $2}' | trim_leading_and_trailing_whitespace)
46 ptl=$(grep 'Project PTL:' "$f" | awk -F: '{print $2}' | trim_leading_and_trailing_whitespace)
47 ptl_name=$(echo $ptl | awk -F, '{print $1}' | trim_leading_and_trailing_whitespace)
48 ptl_email=$(echo $ptl | awk -F, '{print $2}' | trim_leading_and_trailing_whitespace)
49 ptl_irc=$(echo $ptl | awk -F, '{print $3}' | trim_leading_and_trailing_whitespace)
50 updated_committers=$(grep 'Project Committers is updated and accurate?' "$f" \
51 | awk -F'?' '{print $2}' | trim_leading_and_trailing_whitespace)
53 echo " * - $project" | trim_trailing_whitespace
54 echo " - $offset" | trim_trailing_whitespace
55 echo " - $category" | trim_trailing_whitespace
56 echo " - $labels" | trim_trailing_whitespace
57 echo " - $ptl_name" | trim_trailing_whitespace
58 echo " - $ptl_email" | trim_trailing_whitespace
59 echo " - $ptl_irc" | trim_trailing_whitespace
60 echo " - $updated_committers" | trim_trailing_whitespace
62 } > "$MILESTONE_STATUS_DIR/m0.rst"