File tree Expand file tree Collapse file tree 4 files changed +36
-13
lines changed Expand file tree Collapse file tree 4 files changed +36
-13
lines changed Original file line number Diff line number Diff line change 4
4
"spec_versions": {
5
5
"v1": {
6
6
"apigentools_version": "1.6.4",
7
- "regenerated": "2022-09-06 20:46:59.630821 ",
8
- "spec_repo_commit": "36a61042 "
7
+ "regenerated": "2022-09-07 19:30:40.870279 ",
8
+ "spec_repo_commit": "33b7a42c "
9
9
},
10
10
"v2": {
11
11
"apigentools_version": "1.6.4",
12
- "regenerated": "2022-09-06 20:46:59.643602 ",
13
- "spec_repo_commit": "36a61042 "
12
+ "regenerated": "2022-09-07 19:30:40.887104 ",
13
+ "spec_repo_commit": "33b7a42c "
14
14
}
15
15
}
16
16
}
Original file line number Diff line number Diff line change 4
4
- id : generate
5
5
name : Generate
6
6
language : node
7
- entry : make
7
+ entry : bash -c "./generate.sh"
8
8
files : ' ^(\.generator/.*|\.pre-commit-config\.yaml|package\.json|yarn\.lock|\.eslintrc\.js|Makefile|\features/.*)'
9
9
pass_filenames : false
10
10
- id : lint
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ DEFAULT_ERROR_CODES=" 0"
4
+
5
+ # First arg is the command
6
+ # Second arg is the string of acceptable error codes seperated by space. E.g. "0 1"
7
+ pre_commit_wrapper () {
8
+ echo " running pre-commit run --all-files --hook-stage=manual ${1} "
9
+
10
+ exec 5>&1
11
+ acceptable_errors=${2:- $DEFAULT_ERROR_CODES }
12
+ out=$( pre-commit run --all-files --hook-stage=manual " ${1} " | tee >( cat - >&5 ) )
13
+ exit_code=$( echo " $out " | grep -- " - exit code:" | cut -d" :" -f2 | sed ' s/[^0-9]*//g' )
14
+
15
+ if [[ -n $exit_code ]]; then
16
+ re=" ([^0-9]|^)$exit_code ([^0-9]|$)"
17
+ if ! grep -qE " $re " <<< " $acceptable_errors" ; then
18
+ echo " pre-commit subcommand failed with error_code: $exit_code . See output above"
19
+ exit " $exit_code " ;
20
+ fi
21
+ fi
22
+
23
+ echo " command 'pre-commit run --all-files --hook-stage=manual ${1} ' success"
24
+ }
25
+
26
+ rm -rf packages/datadog-api-client-v* / examples/v*
27
+ rm -rf packages/datadog-api-client-* /
28
+ pre_commit_wrapper generator
29
+ pre_commit_wrapper lint
30
+ pre_commit_wrapper examples
31
+ pre_commit_wrapper lint-examples
You can’t perform that action at this time.
0 commit comments