1
0
Fork 0
mirror of https://github.com/sbrl/powahroot.git synced 2024-12-26 04:45:01 +00:00

Alter git remote url when rendering docs to fix github urls

This commit is contained in:
Starbeamrainbowlabs 2019-04-28 17:54:58 +01:00
parent bf75e22b06
commit 1cf10d8aa5
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

10
build
View file

@ -74,10 +74,20 @@ task_setup() {
task_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'";
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_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";
cp -al "logo.png" "${docs_output_folder}/logo.png";
subtask_end $? "Failed to link logo";