diff options
author | Clay Murphy <claym@google.com> | 2015-08-17 17:21:57 -0700 |
---|---|---|
committer | Clay Murphy <claym@google.com> | 2015-08-26 09:25:48 -0700 |
commit | 514dbe0fd043a81c8fbb0c4fcc20b8e9817de0a0 (patch) | |
tree | 89e9acd48352f732e012c751f1fc0bcf3be549bf /scripts | |
parent | 87ef61d2883141c165ee19b337683bdccbbe2add (diff) | |
download | source.android.com-514dbe0fd043a81c8fbb0c4fcc20b8e9817de0a0.tar.gz |
Docs: Add build and staging script
Bug: 18631527
Change-Id: I8f1f29e874f92be4e63fc315c3bf175d06716268
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build2stage.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/scripts/build2stage.sh b/scripts/build2stage.sh new file mode 100755 index 00000000..fb38c364 --- /dev/null +++ b/scripts/build2stage.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# +# How to use: +# From directory {root}/docs/source.android.com/scripts run: +# $ ./build2stage.sh <server number> +# +# For example, to build and stage on staging instance 13, run: +# $ ./build2stage.sh 13 +# + +echo 'Please run this script from the docs/source.android.com/scripts directory ' \ + ' branch/docs/source.android.com/scripts' +echo ' ' + +# Read the configuration file to retrieve the App Engine staging - AE_STAGING - value +source /etc/profile.d/build2stage-conf.sh + +# Go up three directories to build content +cd ../../.. + +# Delete old output +rm -rf out/target/common/docs/online-sac* + +# Initialize the environment +source build/envsetup.sh + +# Make the docs +make online-sac-docs + +# Go to the output directory to stage content +cd out/target/common/docs + +# Edit the app.yaml file to upload to the specified server. +sed 's/staging[0-9]*$/staging'$1'/' online-sac/app.yaml > .temp + +# Copy in new app.yaml content +cp .temp online-sac/app.yaml +rm .temp + +# Stage the data on the server. +$AE_STAGING update online-sac + +echo 'Your staged content is available at staging instance '$1'' |