Skip to content

Commit 35df336

Browse files
remove duplication with docs prebuild
1 parent 8e9020d commit 35df336

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

app/.tmp/prebuild.sh

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,9 @@
22

33
set -e
44

5-
CWD=$(pwd)
6-
75
# Define the path for the defang-docs directory
86
DEFANG_DOCS_PATH=$(readlink -f ./defang-docs)
9-
CLI_DOCS_PATH="$DEFANG_DOCS_PATH/docs/cli"
10-
11-
# Define the path for the defang directory and set the command directory path
12-
DEFANG_PATH=$(readlink -f ./defang)
13-
GEN_DOCS_CMD_PATH="$DEFANG_PATH/src/cmd/gendocs"
14-
15-
# Navigate to the gendocs command directory and run the Go command
16-
cd "$GEN_DOCS_CMD_PATH"
17-
18-
# Ensure all dependencies are downloaded
19-
go mod tidy
20-
go mod download
21-
22-
# Run the Go command
23-
go run main.go "$CLI_DOCS_PATH"
247

258
# Install npm packages in defang-docs
26-
cd "$DEFANG_DOCS_PATH"
27-
npm install
28-
29-
# Return to original directory and run node script
30-
cd "$CWD"
31-
node "$DEFANG_DOCS_PATH/scripts/prep-cli-docs.js"
9+
npm -C $DEFANG_DOCS_PATH install
10+
npm -C $DEFANG_DOCS_PATH run prebuild

0 commit comments

Comments
 (0)