Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create jakartaee-docs build script #40

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Create jakartaee-docs build script
  • Loading branch information
Ndacyayisenga-droid committed Sep 16, 2024
commit e23eadb2b8cd9fc53d7cd85f62e081b8c628ae1c
43 changes: 43 additions & 0 deletions build-jakartaee-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

# Step 1: Build jakartaee-documentation-ui
echo "Building jakartaee-documentation-ui..."
gulp bundle
if [ $? -ne 0 ]; then
echo "Error: Failed to build jakartaee-documentation-ui."
exit 1
fi
echo "Successfully built jakartaee-documentation-ui."

# Step 2: Switch to the jakartaee-documentation repository
cd ../jakartaee-documentation || { echo "Error: jakartaee-documentation directory not found."; exit 1; }
echo "Switched to jakartaee-documentation directory."

# Step 3: Create a local-antora-playbook.yml by copying the existing antora-playbook.yml
echo "Creating local-antora-playbook.yml..."
cp antora-playbook.yml local-antora-playbook.yml
if [ $? -ne 0 ]; then
echo "Error: Failed to create local-antora-playbook.yml."
exit 1
fi
echo "Successfully created local-antora-playbook.yml."

# Step 4: Update the ui.bundle.url in local-antora-playbook.yml
echo "Updating ui.bundle.url in local-antora-playbook.yml..."
sed -i '' "s|url: https://github.com/jakartaee/jakartaee-documentation-ui/releases/download/latest/ui-bundle.zip|url: ../jakartaee-documentation-ui/build/ui-bundle.zip|g" local-antora-playbook.yml
if [ $? -ne 0 ]; then
echo "Error: Failed to update ui.bundle.url."
exit 1
fi
echo "Successfully updated ui.bundle.url to use the local UI bundle."

# Step 5: Build jakartaee-documentation
echo "Building jakartaee-documentation..."
mvn compile -Pauthor-mode
if [ $? -ne 0 ]; then
echo "Error: Failed to build jakartaee-documentation."
exit 1
fi
echo "Successfully built jakartaee-documentation."

# End of script
Loading