File tree 6 files changed +38
-56
lines changed
6 files changed +38
-56
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ functions:
54
54
export GOCACHE="$(pwd)/.cache"
55
55
56
56
# Set other relevant variables for Evergreen processes.
57
- export DRIVERS_TOOLS="$(pwd)/.. /drivers-tools"
57
+ export DRIVERS_TOOLS="$(dirname $(dirname $(dirname ` pwd`))) /drivers-tools"
58
58
export PROJECT_DIRECTORY="$(pwd)"
59
59
export MONGO_ORCHESTRATION_HOME="$DRIVERS_TOOLS/.evergreen/orchestration"
60
60
export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
@@ -329,6 +329,18 @@ functions:
329
329
${PREPARE_SHELL}
330
330
sh ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
331
331
332
+ create-api-report :
333
+ - command : shell.exec
334
+ type : test
335
+ params :
336
+ shell : " bash"
337
+ working_dir : src/go.mongodb.org/mongo-driver
338
+ script : |
339
+ ${PREPARE_SHELL}
340
+ export BASE_SHA=${revision}
341
+ export HEAD_SHA=${github_commit}
342
+ bash etc/api_report.sh
343
+
332
344
send-perf-data :
333
345
- command : perf.send
334
346
params :
@@ -1194,6 +1206,7 @@ tasks:
1194
1206
- func : run-make
1195
1207
vars :
1196
1208
targets : " check-fmt check-license check-modules lint"
1209
+ - func : " create-api-report"
1197
1210
1198
1211
- name : perf
1199
1212
tags : ["performance"]
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export GOCACHE="$(pwd)/.cache"
7
7
export DRIVERS_TOOLS=${DRIVERS_TOOLS:- " " }
8
8
9
9
if [ -z $DRIVERS_TOOLS ]; then
10
- export DRIVERS_TOOLS=" $( pwd) /.. /drivers-tools"
10
+ export DRIVERS_TOOLS== " $( dirname $( dirname $( dirname ` pwd` ) ) ) /drivers-tools"
11
11
fi
12
12
13
13
if [ " Windows_NT" = " $OS " ]; then
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 14
14
.DS_Store
15
15
install
16
16
main.so
17
+ .cache
18
+ install
19
+ libmongocrypt
20
+ venv
17
21
test.suite
18
22
19
23
# AWS SAM-generated files
Original file line number Diff line number Diff line change @@ -24,10 +24,6 @@ build: cross-compile build-tests build-compile-check
24
24
build-tests :
25
25
go test -short $(BUILD_TAGS ) -run ^$$ ./...
26
26
27
- .PHONY : api-report
28
- api-report :
29
- etc/api_report.sh
30
-
31
27
.PHONY : build-compile-check
32
28
build-compile-check :
33
29
etc/compile_check.sh
Original file line number Diff line number Diff line change 3
3
# Generates a report of Go Driver API changes for the current branch.
4
4
set -eux
5
5
6
- cmd=$( command -v gorelease || true)
6
+ # Skip the report of it isn't a PR run.
7
+ if [ " $BASE_SHA " == " $HEAD_SHA " ]; then
8
+ echo " Skipping API Report"
9
+ exit 0
10
+ fi
11
+
12
+ # Ensure a clean checkout.
13
+ git checkout -b test-api-report
14
+ git add .
15
+ git commit -m " local changes"
7
16
17
+ # Ensure gorelease is installed.
18
+ cmd=$( command -v gorelease || true)
8
19
if [ -z $cmd ]; then
9
20
go install golang.org/x/exp/cmd/gorelease@latest
10
21
fi
11
22
12
- branch=${GITHUB_BASE_REF:- master}
13
- git fetch origin $branch :$branch
14
- sha=$( git merge-base $branch HEAD)
15
-
16
- gorelease -base=$sha > api-report.txt || true
17
-
23
+ # Generate and parse the report.
24
+ gorelease -base=$BASE_SHA > api-report.txt || true
25
+ cat api-report.txt
18
26
go run ./cmd/parse-api-report/main.go
27
+ rm api-report.txt
19
28
20
- rm api-report.txt
29
+ # Make the PR comment.
30
+ target=$DRIVERS_TOOLS /.evergreen/github_app/create_or_modify_comment.sh
31
+ bash $target -m " ## API Change Report" -c " $( pwd) /api-report.md" -h $HEAD_SHA -o " mongodb" -n " mongo-go-driver"
You can’t perform that action at this time.
0 commit comments