/
local-pr-validation.sh
executable file
·32 lines (26 loc) · 1.35 KB
/
local-pr-validation.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# Copyright (C) Lightbend Inc. <https://www.lightbend.com>
# shellcheck source=scripts/scriptLib
. "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/scriptLib"
start validation "RUNNING FRAMEWORK VALIDATION"
sbt headerCheck test:headerCheck javafmtCheckAll scalafmtCheckAll scalafmtSbtCheck || (
echo "WARN: Format and/or license headers validaton failed."
echo "You need to run in sbt ';headerCreate ;Test/headerCreate ;javafmtAll ;scalafmtAll ;scalafmtSbt'"
echo "then commit the new changes or amend the existing commit."
echo "See more information about amending commits in our docs:"
echo "https://playframework.com/documentation/latest/WorkingWithGit"
false
)
start validation "FRAMEWORK VALIDATION DONE"
pushd "$DOCUMENTATION"
start doc-validation "RUNNING DOCUMENTATION VALIDATION"
sbt headerCheck test:headerCheck javafmtCheckAll scalafmtCheckAll scalafmtSbtCheck || (
echo "WARN: Format and/or license headers validaton failed."
echo "Inside the documentation/ folder you need to run in sbt ';headerCreate ;test:headerCreate ;javafmtAll ;scalafmtAll ;scalafmtSbt'"
echo "then commit the new changes or amend the existing commit."
echo "See more information about amending commits in our docs:"
echo "https://playframework.com/documentation/latest/WorkingWithGit"
false
)
popd
end doc-validation "ALL VALIDATIONS DONE"