@@ -17,35 +17,28 @@ trap cleanup EXIT
17
17
18
18
log " Use temporary file: ${API_MD_TMP_FILE} "
19
19
20
- (
21
- cd " $SCRIPT_DIR /../.."
22
-
23
- go run github.com/swaggo/swag/cmd/swag@v1.8.6 init \
20
+ pushd " $SCRIPT_DIR /../.."
21
+ go run github.com/swaggo/swag/cmd/swag@v1.8.6 init \
24
22
--generalInfo=" coderd.go" \
25
23
--dir=" ./coderd,./codersdk" \
26
24
--output=" ./coderd/apidoc" \
27
25
--outputTypes=" go,json" \
28
26
--parseDependency=true
29
- ) || exit $?
30
-
31
- (
32
- cd " $SCRIPT_DIR "
33
- npm ci
34
-
35
- # Make sure that widdershins is installed correctly.
36
- npm exec -- widdershins --version
37
-
38
- # Render the Markdown file.
39
- npm exec -- widdershins \
40
- --user_templates " ./markdown-template" \
41
- --search false \
42
- --omitHeader true \
43
- --language_tabs " shell:curl" \
44
- --summary " ../../coderd/apidoc/swagger.json" \
45
- --outfile " ${API_MD_TMP_FILE} "
46
- ) || exit $?
47
-
48
- (
49
- cd " $SCRIPT_DIR "
50
- go run postprocess/main.go -in-md-file-single " ${API_MD_TMP_FILE} "
51
- ) || exit $?
27
+ popd
28
+
29
+ pushd " $SCRIPT_DIR "
30
+ npm ci
31
+
32
+ # Make sure that widdershins is installed correctly.
33
+ npm exec -- widdershins --version
34
+ # Render the Markdown file.
35
+ npm exec -- widdershins \
36
+ --user_templates " ./markdown-template" \
37
+ --search false \
38
+ --omitHeader true \
39
+ --language_tabs " shell:curl" \
40
+ --summary " ../../coderd/apidoc/swagger.json" \
41
+ --outfile " ${API_MD_TMP_FILE} "
42
+ # Perform the postprocessing
43
+ go run postprocess/main.go -in-md-file-single " ${API_MD_TMP_FILE} "
44
+ popd
0 commit comments