-
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Add] apigen helper script to run dockerized ApiGen, (#738)
[Change] Generate ApiGen to build directory and Ignore ApIGen Output, [Change] Refactor Documentation workflow into seperate ApiGen & GitHub Pages jobs
- Loading branch information
1 parent
d16c7e0
commit c734cb0
Showing
3 changed files
with
82 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
################################################################### | ||
# This executable helper does act as a wrapper for the dockerized # | ||
# ApiGen tool. This allows to conveniently run ApiGen while not # | ||
# relying on the CI. # | ||
################################################################### | ||
|
||
# Set the directory to the project root directory | ||
PROJECT_DIR="$(dirname "$(realpath $0)")/.." | ||
|
||
# Define the internal working directory | ||
INTERNAL_DIR="/GameQ" | ||
|
||
# Ensure the ApiGen directory does exit | ||
mkdir -p $PROJECT_DIR/build/apigen | ||
|
||
# Start building the Docker run command | ||
CMD=( docker run ) | ||
|
||
# Run Docker container as the current user / group to prevent permission issues | ||
CMD+=( --user $(id -u):$(id -g) ) | ||
|
||
# Mount the project directory into the Docker Container | ||
CMD+=( --volume "$PROJECT_DIR":"$INTERNAL_DIR" ) | ||
|
||
# Change Docker containers working directory | ||
CMD+=( --workdir $INTERNAL_DIR ) | ||
|
||
# Define Docker image to be used for ApiGen | ||
CMD+=( apigen/apigen:edge ) | ||
|
||
# Configure ApiGen working directory | ||
CMD+=( src ) | ||
|
||
# Configure the ApiGen output directory | ||
CMD+=( --output build/apigen ) | ||
|
||
# Concatenate and run the command | ||
"${CMD[@]}" |