kou commented on code in PR #174:
URL: https://github.com/apache/arrow-adbc/pull/174#discussion_r1047783811


##########
.github/workflows/nightly-website.yml:
##########
@@ -71,3 +74,41 @@ jobs:
           git add --force dev/
           git commit -m "publish documentation" --allow-empty
           git push origin asf-site:asf-site
+
+  publish-tag:
+    name: "Publish Tag Website"
+    if: startsWith(github.ref, 'refs/tags/')
+    runs-on: ubuntu-latest
+    needs: [build]
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+          # NOTE: needed to push at the end
+          persist-credentials: true
+          ref: asf-site
+      - name: Add tagged docs
+        uses: actions/download-artifact@v3
+        with:
+          name: docs
+          path: temp
+      - name: Determine Path
+        id: determine-path
+        run: |
+          regex='^refs/tags/adbc-([0-9]+\.[0-9]+\.[0-9]+)(-rc[0-9]+)?$'
+          if [[ ${{ github.ref }} =~ $regex ]]; then
+            mv temp ${BASH_REMATCH[1]}
+            git add --force ${BASH_REMATCH[1]}
+            ls -laR ${BASH_REMATCH[1]}
+          else
+            exit 1
+          fi
+      - name: Build
+        shell: bash
+        run: |

Review Comment:
   Garbage?



##########
dev/release/03-binary-sign.sh:
##########
@@ -0,0 +1,151 @@
+#!/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.
+
+set -e

Review Comment:
   ```suggestion
   set -eu
   ```



##########
dev/release/utils-prepare.sh:
##########
@@ -0,0 +1,57 @@
+# 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.
+
+ADBC_DIR="${SOURCE_DIR}/../.."
+
+update_versions() {
+  local base_version=$1
+  local next_version=$2
+  local type=$3
+
+  case ${type} in
+    release)
+      local version=${base_version}
+      local docs_version=${base_version}
+      ;;
+    snapshot)
+      local version=${next_version}-SNAPSHOT
+      local docs_version="${next_version} (dev)"
+      ;;
+  esac
+  local major_version=${version%%.*}
+
+  pushd "${ADBC_DIR}/c/"
+  sed -i -E "s/set\(ADBC_VERSION \".+\"\)/set(ADBC_VERSION \"${version}\")/g" 
cmake_modules/AdbcDefines.cmake

Review Comment:
   `sed -i` isn't portable. It works with GNU sed but not with BSD sed. (macOS 
ships BSD sed.)
   `sed -i.bak ...; rm XXX.bak` is portable.



##########
.github/workflows/nightly-website.yml:
##########
@@ -71,3 +74,41 @@ jobs:
           git add --force dev/
           git commit -m "publish documentation" --allow-empty
           git push origin asf-site:asf-site
+
+  publish-tag:
+    name: "Publish Tag Website"
+    if: startsWith(github.ref, 'refs/tags/')
+    runs-on: ubuntu-latest
+    needs: [build]
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+          # NOTE: needed to push at the end
+          persist-credentials: true
+          ref: asf-site
+      - name: Add tagged docs
+        uses: actions/download-artifact@v3
+        with:
+          name: docs
+          path: temp
+      - name: Determine Path
+        id: determine-path
+        run: |
+          regex='^refs/tags/adbc-([0-9]+\.[0-9]+\.[0-9]+)(-rc[0-9]+)?$'
+          if [[ ${{ github.ref }} =~ $regex ]]; then
+            mv temp ${BASH_REMATCH[1]}
+            git add --force ${BASH_REMATCH[1]}
+            ls -laR ${BASH_REMATCH[1]}
+          else
+            exit 1
+          fi
+      - name: Build
+        shell: bash
+        run: |
+      - name: Push changes to asf-site branch
+        run: |
+          git config --global user.name 'GitHub Actions'
+          git config --global user.email '[email protected]'

Review Comment:
   We can use https://avatars.githubusercontent.com/in/15368?s=40&v=4 icon with 
`github-actions[bot]@users.noreply.github.com`.
   
   See also:
   * 
https://github.com/apache/arrow-datafusion-python/pull/104#discussion_r1040341981
   * 
https://github.com/apache/arrow-datafusion-python/commit/a1100499a94e2ab48ab852b8c76f3f9a2db59e01#diff-d54d69dbb27e75dae25cb4b2384310cb57707e419377cf572d5cb0ecc1f16877R71



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to