This repository was archived by the owner on Aug 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +17
-13
lines changed Expand file tree Collapse file tree 3 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
+
3
+ set -euo pipefail
4
+
2
5
echo " Formatting..."
3
6
4
7
go mod tidy
5
8
gofmt -w -s .
6
9
goimports -w " -local=$$ (go list -m)" .
7
10
8
- if [ " $CI " != " " ]; then
9
- if [[ $( git ls-files --other --modified --exclude-standard) != " " ]]; then
11
+ if [[ ${CI-} && $( git ls-files --other --modified --exclude-standard) ]]; then
10
12
echo " Files need generation or are formatted incorrectly:"
11
13
git -c color.ui=always status | grep --color=no ' \e\[31m'
12
14
echo " Please run the following locally:"
13
15
echo " ./ci/steps/fmt.sh"
14
16
exit 1
15
17
fi
16
- fi
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
+
3
+ set -euo pipefail
4
+
2
5
echo " Generating docs..."
3
6
4
7
cd " $( dirname " $0 " ) "
@@ -13,12 +16,10 @@ for filename in ./docs/*.md; do
13
16
done
14
17
15
18
16
- if [ " $CI " != " " ]; then
17
- if [[ $( git ls-files --other --modified --exclude-standard) != " " ]]; then
18
- echo " Documentation needs generation:"
19
- git -c color.ui=always status | grep --color=no ' \e\[31m'
20
- echo " Please run the following locally:"
21
- echo " ./ci/steps/gendocs.sh"
22
- exit 1
23
- fi
24
- fi
19
+ if [[ ${CI-} && $( git ls-files --other --modified --exclude-standard) ]]; then
20
+ echo " Documentation needs generation:"
21
+ git -c color.ui=always status | grep --color=no ' \e\[31m'
22
+ echo " Please run the following locally:"
23
+ echo " ./ci/steps/gendocs.sh"
24
+ exit 1
25
+ fi
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ set -euo pipefail
4
+
3
5
echo " Linting..."
4
6
5
7
go vet ./...
6
- golint -set_exit_status ./...
8
+ golint -set_exit_status ./...
You can’t perform that action at this time.
0 commit comments