This is an automated email from the ASF dual-hosted git repository.

cwylie pushed a commit to branch docs-website-staging
in repository 
https://gitbox.apache.org/repos/asf/incubator-druid-website-src.git

commit 16f86443343ee84b6a553e7d6eca63487c3ff581
Author: Clint Wylie <cwy...@apache.org>
AuthorDate: Fri Sep 6 16:06:19 2019 -0700

    add option to use different branch than version to allow staging a website
---
 release.sh | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/release.sh b/release.sh
index 4b925d3..9c0d21d 100755
--- a/release.sh
+++ b/release.sh
@@ -16,10 +16,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-if [ "$#" -ne 1 ]; then
-  echo "Illegal number of parameters, should be just one: the version";
+
+if [ "$#" -ne 1 ] && [ "$#" -ne 2 ]; then
+  echo "Illegal number of parameters, should one or two: the version, or the 
version and commitish";
   exit 1;
 fi
+
 echo "Building to docs for '$1'..."
 
 baseDir=$(pwd)
@@ -30,8 +32,16 @@ mkdir -p _staging/
 cd _staging/
 git clone g...@github.com:apache/incubator-druid.git
 cd incubator-druid/
-git checkout druid-$1
-mvn -Pwebsite-docs -pl website compile -Dwebsite.src=$baseDir
+git checkout $commitish
+
+if [ "$#" -gt 1 ]; then
+  git checkout $2
+  mvn -Pwebsite-docs -pl website compile -Dwebsite.src=$baseDir 
-Dwebsite.version=$1
+else
+  git checkout druid-$1
+  mvn -Pwebsite-docs -pl website compile -Dwebsite.src=$baseDir
+fi
+
 popd
 
 git add .


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to