-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow use of forks in case of origin so we generate preview-docs for …
…JS too
- Loading branch information
Showing
1 changed file
with
6 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,12 +32,14 @@ yarn lint:ci | |
yarn build | ||
|
||
if [ "${BUILD_DOCS_JS}" == "ON" ]; then | ||
if [[ "$(git config --get remote.origin.url)" =~ "https://github.com/apache/arrow" ]]; then | ||
yarn doc | ||
# If apache or upstream are defined use those as remote. | ||
# Otherwise use origin which could be a fork on PRs. | ||
if [ "$(git config --get remote.apache.url)" == "[email protected]:apache/arrow.git" ]; then | ||
yarn doc --gitRemote apache | ||
elif [[ "$(git config --get remote.upstream.url)" =~ "https://github.com/apache/arrow" ]]; then | ||
yarn doc --gitRemote upstream | ||
elif [ "$(git config --get remote.apache.url)" == "[email protected]:apache/arrow.git" ]; then | ||
yarn doc --gitRemote apache | ||
elif [[ "$(basename -s .git $(git config --get remote.origin.url))" == "arrow" ]]; then | ||
yarn doc | ||
else | ||
echo "Failed to build docs because the remote is not set correctly. Please set the origin or upstream remote to https://github.com/apache/arrow.git or the apache remote to [email protected]:apache/arrow.git." | ||
exit 0 | ||
|