You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/05/02 07:24:52 UTC

[GitHub] [flink] zentol commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

zentol commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r862638444


##########
docs/setup_docs.sh:
##########
@@ -0,0 +1,50 @@
+#!/usr/bin/env bash
+################################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+# Create a default go.mod file
+cat <<EOF >go.mod
+module github.com/apache/flink
+
+go 1.18
+EOF
+
+# Display installed version of Go
+go version
+
+
+# Make Hugo retrieve modules which are used for externally hosted documentation
+currentBranch="$1"
+
+echo "Current branch: $currentBranch"
+
+if [[ ! "$currentBranch" =~ ^release- ]] || [[ -z "$currentBranch" ]]; then
+  # If the current branch is master or not provided, get the documentation from the main branch
+  echo "The current branch is not a release branch, so let's get documentation from the main branch"
+  if [ ! command -v hugo &> /dev/null ]; then
+    echo "Hugo is not installed"
+    Running "./hugo mod get -u github.com/apache/flink-connector-elasticsearch/docs@main"
+    ./hugo mod get -u github.com/apache/flink-connector-elasticsearch/docs@main

Review Comment:
   should we just migrate the docs build to our CI images as well? Then we can streamline this whole thing.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org