You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by cw...@apache.org on 2019/09/25 01:54:00 UTC

[incubator-druid] branch 0.16.0-incubating updated: add druid version correctly (#8586) (#8587)

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

cwylie pushed a commit to branch 0.16.0-incubating
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git


The following commit(s) were added to refs/heads/0.16.0-incubating by this push:
     new c0fc994  add druid version correctly (#8586) (#8587)
c0fc994 is described below

commit c0fc994a22b7644450af8ef89f3ba669b5a6819a
Author: Clint Wylie <cw...@apache.org>
AuthorDate: Tue Sep 24 18:53:50 2019 -0700

    add druid version correctly (#8586) (#8587)
---
 website/pom.xml              |  2 ++
 website/script/build-to-docs | 19 ++++++++++---------
 website/script/fix-path.js   | 11 ++++++-----
 3 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/website/pom.xml b/website/pom.xml
index 65e38d3..06a086d 100644
--- a/website/pom.xml
+++ b/website/pom.xml
@@ -85,6 +85,7 @@
               <executable>script/build-to-docs</executable>
               <arguments>
                 <argument>${website.version}</argument>
+                <argument>${website.version}</argument>
                 <argument>${website.src}</argument>
               </arguments>
             </configuration>
@@ -99,6 +100,7 @@
               <executable>script/build-to-docs</executable>
               <arguments>
                 <argument>latest</argument>
+                <argument>${website.version}</argument>
                 <argument>${website.src}</argument>
               </arguments>
             </configuration>
diff --git a/website/script/build-to-docs b/website/script/build-to-docs
index ea8318c..dba1d6e 100755
--- a/website/script/build-to-docs
+++ b/website/script/build-to-docs
@@ -16,19 +16,20 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-if [ "$#" -ne 1 ] && [ "$#" -ne 2 ]; then
+if [ "$#" -ne 2 ] && [ "$#" -ne 3 ]; then
   echo "Illegal number of parameters, should one or two: the version, or the version and website-src directory";
   exit 1;
 fi
 
-VERSION=$1
+URL_VERSION=$1
+DRUID_VERSION=$2
 WEBSRC="../../incubator-druid-website-src"
 
-if [ "$#" -gt 1 ]; then
-  WEBSRC=$2
+if [ "$#" -gt 2 ]; then
+  WEBSRC=$3
 fi
 
-echo "Building to docs for '$VERSION' to $WEBSRC ..."
+echo "Building to docs for '$URL_VERSION' to $WEBSRC ..."
 
 npm run compile-scss
 
@@ -42,13 +43,13 @@ else
   rm build-log.txt
 fi
 
-node script/fix-path.js $VERSION
+node script/fix-path.js $URL_VERSION $DRUID_VERSION
 
 echo "Cleaning..."
-rm -rf $WEBSRC/docs/$VERSION/
-mkdir -p $WEBSRC/docs/$VERSION/
+rm -rf $WEBSRC/docs/$URL_VERSION/
+mkdir -p $WEBSRC/docs/$URL_VERSION/
 
-cp -r ./build/ApacheDruid/docs/* $WEBSRC/docs/$VERSION/
+cp -r ./build/ApacheDruid/docs/* $WEBSRC/docs/$URL_VERSION/
 
 mkdir -p $WEBSRC/css
 cp ./build/ApacheDruid/css/* $WEBSRC/css
diff --git a/website/script/fix-path.js b/website/script/fix-path.js
index 0ae98c2..07ddb6f 100644
--- a/website/script/fix-path.js
+++ b/website/script/fix-path.js
@@ -18,26 +18,27 @@
 
 const replace = require('replace-in-file');
 
-if (process.argv.length !== 3) {
-  console.log('Usage: node fix-path.js 0.16.0');
+if (process.argv.length !== 4) {
+  console.log('Usage: node fix-path.js latest 0.16.0-incubating');
   process.exit(1);
 }
 
-var version = process.argv[2];
+var urlVersion = process.argv[2];
+var druidVersion = process.argv[3];
 
 try {
   // Fix doc paths
   replace.sync({
     files: './build/ApacheDruid/docs/**/*.html',
     from: /\/docs\//g,
-    to: '/docs/' + version + '/',
+    to: '/docs/' + urlVersion + '/',
   });
 
   // Interpolate {{DRUIDVERSION}}
   replace.sync({
     files: './build/ApacheDruid/docs/**/*.html',
     from: /\{\{DRUIDVERSION\}\}/g,
-    to: version,
+    to: druidVersion,
   });
   console.log('Fixed versions');
 } catch (error) {


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