-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail CI if the docs are outdated (#961)
* Fail CI if the docs are outdated * Add and use test that the docs are up to date * Add EOL --------- Co-authored-by: Corbin McNeely-Smith <restingbull@mcneely-smith.com> Co-authored-by: Corbin McNeely-Smith <58151731+restingbull@users.noreply.github.com>
- Loading branch information
1 parent
b67dd8d
commit 2f2b7a9
Showing
5 changed files
with
90 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
sh_test( | ||
name = "are_docs_up_to_date_test", | ||
srcs = ["are_docs_up_to_date_test.sh"], | ||
args = [ | ||
"$(location kotlin.md)", | ||
"$(location //kotlin:stardoc)", | ||
], | ||
data = [ | ||
"kotlin.md", | ||
"//kotlin:stardoc", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
function fail { | ||
echo >&2 "##### $1 ######" | ||
exit 1 | ||
} | ||
|
||
current="$1" | ||
new="$2" | ||
[[ -f $new ]] || fail "missing new docs" | ||
[[ -f $current ]] || fail "missing current docs" | ||
|
||
diff -u "$1" "$2" || fail "kotlin docs are out of date" |
Oops, something went wrong.