-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate-docs.sh
More file actions
executable file
·45 lines (36 loc) · 1.47 KB
/
generate-docs.sh
File metadata and controls
executable file
·45 lines (36 loc) · 1.47 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Script to generate documentation for MainWP Dashboard and Child repositories
# Create build directory for cache if it doesn't exist
mkdir -p build/cache/dashboard build/cache/child
# Check if source repositories exist
if [ ! -d "sources/mainwp-dashboard" ]; then
echo "Error: MainWP Dashboard repository not found in sources/mainwp-dashboard"
echo "Please clone the repository first:"
echo "git clone https://github.com/mainwp/mainwp.git sources/mainwp-dashboard"
exit 1
fi
if [ ! -d "sources/mainwp-child" ]; then
echo "Error: MainWP Child repository not found in sources/mainwp-child"
echo "Please clone the repository first:"
echo "git clone https://github.com/mainwp/mainwp-child.git sources/mainwp-child"
exit 1
fi
# Generate documentation for Dashboard
echo "Generating documentation for MainWP Dashboard..."
vendor/bin/phpdoc -c phpdoc/dashboard.xml
# Check if documentation generation was successful
if [ $? -ne 0 ]; then
echo "Error: Failed to generate documentation for MainWP Dashboard"
exit 1
fi
# Generate documentation for Child
echo "Generating documentation for MainWP Child..."
vendor/bin/phpdoc -c phpdoc/child.xml
# Check if documentation generation was successful
if [ $? -ne 0 ]; then
echo "Error: Failed to generate documentation for MainWP Child"
exit 1
fi
echo "Documentation generation completed successfully!"
echo "Dashboard documentation: source-code/dashboard/index.html"
echo "Child documentation: source-code/child/index.html"