mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-04 15:58:39 +00:00
avoid publishing to the root unless specified, so old version releases only goto their own dir
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
This commit is contained in:
@@ -35,10 +35,12 @@ RUN VERSION=$(cat /docs/VERSION) &&\
|
||||
GIT_BRANCH=$(cat /docs/GIT_BRANCH) &&\
|
||||
GITCOMMIT=$(cat /docs/GITCOMMIT) &&\
|
||||
AWS_S3_BUCKET=$(cat /docs/AWS_S3_BUCKET) &&\
|
||||
BUILD_DATE=$(date) &&\
|
||||
sed -i "s/\$VERSION/$VERSION/g" /docs/theme/mkdocs/base.html &&\
|
||||
sed -i "s/\$MAJOR_MINOR/v$MAJOR_MINOR/g" /docs/theme/mkdocs/base.html &&\
|
||||
sed -i "s/\$GITCOMMIT/$GITCOMMIT/g" /docs/theme/mkdocs/base.html &&\
|
||||
sed -i "s/\$GIT_BRANCH/$GIT_BRANCH/g" /docs/theme/mkdocs/base.html &&\
|
||||
sed -i "s/\$BUILD_DATE/$BUILD_DATE/g" /docs/theme/mkdocs/base.html &&\
|
||||
sed -i "s/\$AWS_S3_BUCKET/$AWS_S3_BUCKET/g" /docs/theme/mkdocs/base.html
|
||||
|
||||
# note, EXPOSE is only last because of https://github.com/dotcloud/docker/issues/3525
|
||||
|
||||
+8
-2
@@ -106,10 +106,16 @@ upload_current_documentation() {
|
||||
}
|
||||
|
||||
setup_s3
|
||||
build_current_documentation
|
||||
upload_current_documentation
|
||||
|
||||
# Default to only building the version specific docs so we don't clober the latest by accident with old versions
|
||||
if [ "$BUILD_ROOT" == "yes" ]; then
|
||||
echo "Building root documentation"
|
||||
build_current_documentation
|
||||
upload_current_documentation
|
||||
fi
|
||||
|
||||
#build again with /v1.0/ prefix
|
||||
sed -i "s/^site_url:.*/site_url: \/$MAJOR_MINOR\//" mkdocs.yml
|
||||
echo "Building the /$MAJOR_MINOR/ documentation"
|
||||
build_current_documentation
|
||||
upload_current_documentation "/$MAJOR_MINOR/"
|
||||
|
||||
Vendored
+2
-1
@@ -4,10 +4,11 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
{% set docker_version = "$VERSION" %}{% set major_minor = "$MAJOR_MINOR" %}{% set docker_commit = "$GITCOMMIT" %}{% set docker_branch = "$GIT_BRANCH" %}{% set aws_bucket = "$AWS_S3_BUCKET" %}
|
||||
{% set docker_version = "$VERSION" %}{% set major_minor = "$MAJOR_MINOR" %}{% set docker_commit = "$GITCOMMIT" %}{% set docker_branch = "$GIT_BRANCH" %}{% set aws_bucket = "$AWS_S3_BUCKET" %}{% set build_date = "$BUILD_DATE" %}
|
||||
<meta name="docker_version" content="{{ docker_version }}">
|
||||
<meta name="docker_git_branch" content="{{ docker_branch }}">
|
||||
<meta name="docker_git_commit" content="{{ docker_commit }}">
|
||||
<meta name="docker_build_date" content="{{ build_date }}">
|
||||
|
||||
{% if meta.page_description %}<meta name="description" content="{{ meta.page_description[0] }}">{% endif %}
|
||||
{% if meta.page_keywords %}<meta name="keywords" content="{{ meta.page_keywords[0] }}">{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user