mirror of
https://github.com/sbrl/powahroot.git
synced 2024-11-24 15:13:00 +00:00
Alter git remote url when rendering docs to fix github urls
This commit is contained in:
parent
bf75e22b06
commit
1cf10d8aa5
1 changed files with 10 additions and 0 deletions
10
build
10
build
|
@ -74,10 +74,20 @@ task_setup() {
|
||||||
task_docs() {
|
task_docs() {
|
||||||
task_begin "Rendering API docs";
|
task_begin "Rendering API docs";
|
||||||
|
|
||||||
|
subtask_begin "Altering git remote";
|
||||||
|
remote_name="$(git remote | head -n1)";
|
||||||
|
remote_url="$(git remote get-url "${remote_name}")";
|
||||||
|
git remote set-url "${remote_name}" "https://github.com/sbrl/powahroot.git";
|
||||||
|
subtask_end $? "Failed to alter git remote";
|
||||||
|
|
||||||
subtask_begin "Calling 'documentation'";
|
subtask_begin "Calling 'documentation'";
|
||||||
node_modules/.bin/documentation build --github --output "${docs_output_folder}" --format html --favicon "logo.png" "$(jq --raw-output .main <package.json)";
|
node_modules/.bin/documentation build --github --output "${docs_output_folder}" --format html --favicon "logo.png" "$(jq --raw-output .main <package.json)";
|
||||||
subtask_end $? "'documentation' exited with an error";
|
subtask_end $? "'documentation' exited with an error";
|
||||||
|
|
||||||
|
subtask_begin "Reverting git remote alteration";
|
||||||
|
git remote set-url "${remote_name}" "${remote_url}";
|
||||||
|
subtask_end $? "Failed to revert remote alteration";
|
||||||
|
|
||||||
subtask_begin "Linking logo to docs folder";
|
subtask_begin "Linking logo to docs folder";
|
||||||
cp -al "logo.png" "${docs_output_folder}/logo.png";
|
cp -al "logo.png" "${docs_output_folder}/logo.png";
|
||||||
subtask_end $? "Failed to link logo";
|
subtask_end $? "Failed to link logo";
|
||||||
|
|
Loading…
Reference in a new issue