Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 73a7013

Browse files
committed
Fix: SCRIPT_DIR
1 parent 82a680d commit 73a7013

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/apidocgen/generate.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
set -euo pipefail
77
# shellcheck source=scripts/lib.sh
8-
source "$(dirname "${BASH_SOURCE[0]}")/../lib.sh"
8+
source "$(dirname "$(dirname "${BASH_SOURCE[0]}")")/lib.sh"
99

10-
SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
10+
APIDOCGEN_DIR=$(dirname "${BASH_SOURCE[0]}")
1111
API_MD_TMP_FILE=$(mktemp /tmp/coder-apidocgen.XXXXXX)
1212

1313
cleanup() {
@@ -17,7 +17,7 @@ trap cleanup EXIT
1717

1818
log "Use temporary file: ${API_MD_TMP_FILE}"
1919

20-
pushd "$SCRIPT_DIR/../.."
20+
pushd "${APIDOCGEN_DIR}/../.."
2121
go run github.com/swaggo/swag/cmd/[email protected] init \
2222
--generalInfo="coderd.go" \
2323
--dir="./coderd,./codersdk" \
@@ -26,7 +26,7 @@ go run github.com/swaggo/swag/cmd/[email protected] init \
2626
--parseDependency=true
2727
popd
2828

29-
pushd "$SCRIPT_DIR"
29+
pushd "${APIDOCGEN_DIR}"
3030
npm ci
3131

3232
# Make sure that widdershins is installed correctly.

0 commit comments

Comments
 (0)