File tree Expand file tree Collapse file tree 3 files changed +31
-8
lines changed Expand file tree Collapse file tree 3 files changed +31
-8
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Find the enhancements files that are new in the current PR.
4+
5+ SCRIPTDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
6+
7+ set -o errexit
8+ set -o pipefail
9+
10+ FILELIST=/tmp/$$ .filelist
11+ git ls-tree --name-only -r " ${PULL_BASE_SHA:- origin/ master} " enhancements > $FILELIST
12+
13+ for f in $( ${SCRIPTDIR} /find_changed.sh) ; do
14+ if ! grep -q $f $FILELIST ; then
15+ echo $f
16+ fi
17+ done
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- set -x
4-
53# Ensure the enhancement metadata includes the required information
64
75set -o errexit
@@ -15,8 +13,11 @@ SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
1513# incompatible with existing documents.
1614CHANGED_FILES=$( ${SCRIPTDIR} /find_changed.sh)
1715
18- if [ -n " $CHANGED_FILES " ]; then
19- (cd tools && go build -o ../enhancement-tool -mod=mod ./main.go)
20-
21- ./enhancement-tool metadata-lint ${CHANGED_FILES}
16+ if [ -z " $CHANGED_FILES " ]; then
17+ echo " OK, no changed enhancements found"
18+ exit 0
2219fi
20+
21+ (cd tools && go build -o ../enhancement-tool -mod=mod ./main.go)
22+
23+ ./enhancement-tool metadata-lint ${CHANGED_FILES}
Original file line number Diff line number Diff line change @@ -14,10 +14,15 @@ TEMPLATE=${SCRIPTDIR}/../guidelines/enhancement_template.md
1414# We only look at the files that have changed in the current PR, to
1515# avoid problems when the template is changed in a way that is
1616# incompatible with existing documents.
17- CHANGED_FILES=$( ${SCRIPTDIR} /find_changed.sh)
17+ NEW_FILES=$( ${SCRIPTDIR} /find_new.sh)
18+
19+ if [ -z " $NEW_FILES " ]; then
20+ echo " OK, no new enhancement files found"
21+ exit 0
22+ fi
1823
1924RC=0
20- for file in $CHANGED_FILES
25+ for file in $NEW_FILES
2126do
2227 echo " Checking ${file} "
2328
You can’t perform that action at this time.
0 commit comments