This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #192 from alohr51/single-guide-repo
use single guide repo
- Loading branch information
Showing
7 changed files
with
48 additions
and
91 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
This file was deleted.
Oops, something went wrong.
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,36 @@ | ||
# Clone the guides (draft or published) | ||
GUIDES_GIT_URL=${1:-"https://github.com/kabanero-io/guides.git"} | ||
GUIDES_GIT_REVISION=${2:-"master"} | ||
# ADD guides we want skipped here, todo to make this a parameter | ||
SKIP_GUIDES=() | ||
|
||
CUR_DIR="$(cd $(dirname $0) && pwd)" | ||
|
||
pushd "$CUR_DIR/../src/main/content" | ||
|
||
# Remove the folder to allow this repeating execution of this script | ||
rm -rf guides | ||
|
||
echo "Start cloning guides repository: ${GUIDES_GIT_URL} with revision: ${GUIDES_GIT_REVISION}" | ||
mkdir guides-tmp guides && cd guides-tmp | ||
|
||
# This is how you clone a repo without autocreating a parent folder with the name of the repo | ||
# The clone is picky about cloning into a folder that is not empty (src/main/content) | ||
git clone "${GUIDES_GIT_URL}" --branch "${GUIDES_GIT_REVISION}" . | ||
mv publish/* ../guides | ||
|
||
if [ "$JEKYLL_DRAFT_GUIDES" == "true" ]; then | ||
mv draft/* ../guides | ||
fi | ||
|
||
rm -rf ../guides-tmp | ||
|
||
# Remove guides we want skipped from guides dir | ||
for guide in ${SKIP_GUIDES[@]}; do | ||
rm -rf ../guides/"${guide}"; | ||
done | ||
|
||
popd | ||
echo "Done cloning guides repositorys" | ||
|
||
|
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