-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added versioning to website and created script for cloning docs Signed-off-by: thisisobate <[email protected]> * improved banner.html and modified some css classes Signed-off-by: thisisobate <[email protected]> * changed docs file name from release to versions (v) Signed-off-by: thisisobate <[email protected]> * improved banner.html to include the actually past version we are looking on Signed-off-by: thisisobate <[email protected]> * Capitalized sidemenu header sections Signed-off-by: thisisobate <[email protected]> * Improved release regex to catch missing release docs Signed-off-by: thisisobate <[email protected]> * Fixed linking in version picker to accomodate more levels of dirsstructure Signed-off-by: thisisobate <[email protected]> * added semver sorting capability in version picker Signed-off-by: thisisobate <[email protected]> * clearly formatted the scripts and fixed linking in docs/how-to-contribute.md Signed-off-by: thisisobate <[email protected]> * fixed linking connectivity in docs/getting-started.md Signed-off-by: thisisobate <[email protected]> * made plugin to clone only major.minor release branches Signed-off-by: thisisobate <[email protected]> * fixed explicit bash call in makefile and renamed branch variable to tags in websitepreprocess Signed-off-by: thisisobate <[email protected]> * cleaned up websitepreprocess by removing irrelevant comments Signed-off-by: thisisobate <[email protected]> * fixed proposal, components, and operating dirs to render content on website Signed-off-by: thisisobate <[email protected]> * formatted scripts appropriately Signed-off-by: thisisobate <[email protected]> * cleaned up code Signed-off-by: thisisobate <[email protected]> * disable search for now until we fix it to understand new dir structure Signed-off-by: thisisobate <[email protected]> * updated Hugo version to utilise new Hugo variables and functions Signed-off-by: thisisobate <[email protected]> * made Proposal, components, and operating to render without deleting _index.md Signed-off-by: thisisobate <[email protected]> * disabled searchbox until we fix it to understand new dir structure Signed-off-by: thisisobate <[email protected]>
- Loading branch information
1 parent
ee855dc
commit 0b8507c
Showing
16 changed files
with
172 additions
and
135 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 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 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,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Regexp take from https://semver.org/ | ||
# If we want to limit those we can sort, and have only head -n X of them etc | ||
RELEASE_FILTER_RE="release-(0|[1-9]\d*)\.(0|[1-9]\d*)$" | ||
WEBSITE_DIR="website" | ||
ORIGINAL_CONTENT_DIR="docs" | ||
OUTPUT_CONTENT_DIR="${WEBSITE_DIR}/docs-pre-processed" | ||
FILES="${WEBSITE_DIR}/docs-pre-processed/*" | ||
|
||
git remote add upstream https://github.com/thanos-io/thanos.git | ||
git remote add origin https://github.com/thanos-io/thanos.git | ||
git remote -v | ||
git fetch origin | ||
|
||
RELEASE_BRANCHES=$(git branch --all | grep -P "remotes/origin/${RELEASE_FILTER_RE}" | egrep --invert-match '(:?HEAD|master)$' | sort -V) | ||
echo ">> chosen $(echo ${RELEASE_BRANCHES}) releases to deploy docs from" | ||
|
||
rm -rf ${OUTPUT_CONTENT_DIR} | ||
mkdir -p "${OUTPUT_CONTENT_DIR}/tip" | ||
|
||
# Copy original content from current state first. | ||
cp -r ${ORIGINAL_CONTENT_DIR}/* "${OUTPUT_CONTENT_DIR}/tip" | ||
scripts/website/contentpreprocess.sh "${OUTPUT_CONTENT_DIR}/tip" 100000 | ||
|
||
#create variable for weight value | ||
WEIGHT_VALUE=0 | ||
|
||
for branchRef in ${RELEASE_BRANCHES}; do | ||
WEIGHT_VALUE=$((WEIGHT_VALUE + 1)) | ||
branchName=${branchRef##*/} | ||
tags=${branchName/release-/v} | ||
echo ">> cloning docs for versioning ${tags}" | ||
mkdir -p "${OUTPUT_CONTENT_DIR}/${tags}" | ||
git archive --format=tar "refs/${branchRef}" | tar -C${OUTPUT_CONTENT_DIR}/${tags} -x "docs/" --strip-components=1 | ||
scripts/website/contentpreprocess.sh "${OUTPUT_CONTENT_DIR}/${tags}" ${WEIGHT_VALUE} | ||
done |
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 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
Oops, something went wrong.