Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
| ... | ... |
@@ -34,7 +34,7 @@ docs-shell: docs-build |
| 34 | 34 |
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" bash |
| 35 | 35 |
|
| 36 | 36 |
docs-release: docs-build |
| 37 |
- $(DOCKER_RUN_DOCS) -e BUILD_ROOT "$(DOCKER_DOCS_IMAGE)" ./release.sh |
|
| 37 |
+ $(DOCKER_RUN_DOCS) -e OPTIONS -e BUILD_ROOT "$(DOCKER_DOCS_IMAGE)" ./release.sh |
|
| 38 | 38 |
|
| 39 | 39 |
test: build |
| 40 | 40 |
$(DOCKER_RUN_DOCKER) hack/make.sh binary cross test-unit test-integration test-integration-cli |
| ... | ... |
@@ -14,6 +14,8 @@ If you're publishing the current release's documentation, also set `BUILD_ROOT=y |
| 14 | 14 |
make AWS_S3_BUCKET=docs-stage.docker.com docs-release |
| 15 | 15 |
|
| 16 | 16 |
will then push the documentation site to your s3 bucket. |
| 17 |
+ |
|
| 18 |
+ Note: you can add `OPTIONS=--dryrun` to see what will be done without sending to the server |
|
| 17 | 19 |
EOF |
| 18 | 20 |
exit 1 |
| 19 | 21 |
} |
| ... | ... |
@@ -22,7 +24,7 @@ EOF |
| 22 | 22 |
|
| 23 | 23 |
VERSION=$(cat VERSION) |
| 24 | 24 |
|
| 25 |
-if [ "$$AWS_S3_BUCKET" == "docs.docker.com" ]; then |
|
| 25 |
+if [ "$AWS_S3_BUCKET" == "docs.docker.com" ]; then |
|
| 26 | 26 |
if [ "${VERSION%-dev}" != "$VERSION" ]; then
|
| 27 | 27 |
echo "Please do not push '-dev' documentation to docs.docker.com ($VERSION)" |
| 28 | 28 |
exit 1 |
| ... | ... |
@@ -96,7 +98,7 @@ upload_current_documentation() {
|
| 96 | 96 |
done |
| 97 | 97 |
include="--include *.$i $include" |
| 98 | 98 |
echo "uploading *.$i" |
| 99 |
- run="aws s3 sync --profile $BUCKET --cache-control \"max-age=3600\" --acl public-read \ |
|
| 99 |
+ run="aws s3 sync $OPTIONS --profile $BUCKET --cache-control \"max-age=3600\" --acl public-read \ |
|
| 100 | 100 |
$include \ |
| 101 | 101 |
--exclude *.text* \ |
| 102 | 102 |
--exclude *.*~ \ |
| ... | ... |
@@ -118,7 +120,9 @@ upload_current_documentation() {
|
| 118 | 118 |
done |
| 119 | 119 |
} |
| 120 | 120 |
|
| 121 |
-setup_s3 |
|
| 121 |
+if [ "$OPTIONS" != "--dryrun" ]; then |
|
| 122 |
+ setup_s3 |
|
| 123 |
+fi |
|
| 122 | 124 |
|
| 123 | 125 |
# Default to only building the version specific docs so we don't clober the latest by accident with old versions |
| 124 | 126 |
if [ "$BUILD_ROOT" == "yes" ]; then |