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


##########
.github/workflows/packaging.yml:
##########
@@ -302,8 +302,14 @@ jobs:
       - name: Extract source archive
         run: |
           tar xf apache-arrow-adbc-${{ steps.info.outputs.VERSION }}.tar.gz
+
+          source ./apache-arrow-adbc-${{ steps.info.outputs.VERSION 
}}/dev/release/versions.env
+
           mv apache-arrow-adbc-${{ steps.info.outputs.VERSION }} adbc
-          mv apache-arrow-adbc-${{ steps.info.outputs.VERSION }}.tar.gz 
adbc/ci/linux-packages/

Review Comment:
   It's not related to this PR but we can remove `echo "VERSION=${VERSION}" >> 
"$GITHUB_OUTPUT"` and always use `${VERSION}` instead of `${{ 
steps.info.outputs.VERSION }}`.



##########
.github/workflows/packaging.yml:
##########
@@ -302,8 +302,14 @@ jobs:
       - name: Extract source archive
         run: |
           tar xf apache-arrow-adbc-${{ steps.info.outputs.VERSION }}.tar.gz
+
+          source ./apache-arrow-adbc-${{ steps.info.outputs.VERSION 
}}/dev/release/versions.env
+
           mv apache-arrow-adbc-${{ steps.info.outputs.VERSION }} adbc
-          mv apache-arrow-adbc-${{ steps.info.outputs.VERSION }}.tar.gz 
adbc/ci/linux-packages/
+          # Need to align the file path with the version number (and not the 
release)

Review Comment:
   Ah, we use `apache-arrow-adbc-YYYY.MM` tag after this PR?
   (`VERSION` is `YYYY.MM` and `VERSION_NATIVE` is `1.0.0`, right?)



##########
dev/release/versions.env:
##########
@@ -0,0 +1,30 @@
+# 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.
+
+# The release as a whole has a date-based identifier.  This is used to
+# identify tags, branches, and so on.
+RELEASE="2024.05"

Review Comment:
   We may want to add date too. (e.g. `2024.05.29`)
   We may want to publish multiple versions in a month.



##########
dev/release/utils-prepare.sh:
##########
@@ -16,32 +16,53 @@
 # under the License.
 
 ADBC_DIR="${SOURCE_DIR}/../.."
+source "${SOURCE_DIR}/versions.env"
 
 update_versions() {
-  local base_version=$1
-  local next_version=$2
-  local type=$3
+  local type=$1
 
+  local conda_version="${VERSION_NATIVE}"
+  local csharp_version="${VERSION_CSHARP}"
+  local rust_version="${VERSION_CSHARP}"
   case ${type} in
     release)
-      local version=${base_version}
-      local conda_version=${base_version}
-      local docs_version=${base_version}
-      local py_version=${base_version}
-      local r_version=${base_version}
+      local cmake_version="${VERSION_NATIVE}"
+      local docs_version="${RELEASE}"
+      local glib_version="${VERSION_NATIVE}"
+      local java_version="${VERSION_JAVA}"
+      local linux_version="${VERSION_NATIVE}"
+      local py_version="${VERSION_NATIVE}"
+      local r_version="${VERSION_R}"
       ;;
     snapshot)
-      local version=${next_version}-SNAPSHOT
-      local conda_version=${next_version}
-      local docs_version="${next_version} (dev)"
-      local py_version="${next_version}dev"
-      local r_version="${base_version}.9000"
+      local cmake_version="${VERSION_NATIVE}-SNAPSHOT"
+      local docs_version="${RELEASE} (dev)"
+      local glib_version="${VERSION_NATIVE}-SNAPSHOT"
+      local java_version="${VERSION_JAVA}-SNAPSHOT"
+      local linux_version="${VERSION_NATIVE}-SNAPSHOT"
+      local py_version="${VERSION_NATIVE}dev"
+      local r_version="${VERSION_R}.9000"
+      ;;
+    *)
+      echo "Unknown type: ${type}"
+      exit 1
       ;;
   esac
-  local major_version=${version%%.*}
+
+  header "Updating versions for release ${RELEASE}"
+  echo "CMake: ${cmake_version}"

Review Comment:
   How about `C` not `CMake` because we use `c/` as directory?
   
   ```suggestion
     echo "C: ${c_version}"
   ```



##########
.github/workflows/packaging.yml:
##########
@@ -302,8 +302,14 @@ jobs:
       - name: Extract source archive
         run: |
           tar xf apache-arrow-adbc-${{ steps.info.outputs.VERSION }}.tar.gz
+
+          source ./apache-arrow-adbc-${{ steps.info.outputs.VERSION 
}}/dev/release/versions.env
+
           mv apache-arrow-adbc-${{ steps.info.outputs.VERSION }} adbc
-          mv apache-arrow-adbc-${{ steps.info.outputs.VERSION }}.tar.gz 
adbc/ci/linux-packages/
+          # Need to align the file path with the version number (and not the 
release)
+          cp -r adbc apache-arrow-adbc-${VERSION_NATIVE}
+          tar czf 
adbc/ci/linux-packages/apache-arrow-adbc-${VERSION_NATIVE}.tar.gz 
apache-arrow-adbc-${VERSION_NATIVE}

Review Comment:
   I can update `ci/linux-packages/` to use 
`apache-arrow-adbc-${RELEASE}.tar.gz` instead of 
`apache-arrow-adbc-${VERSION_NATIVE}.tar.gz`.
   Should I do this in this branch or in a separated PR?



##########
dev/release/03-source.sh:
##########
@@ -63,18 +55,16 @@ main() {
 
     # commit to svn
     svn add "tmp/${tag}"
-    svn ci -m "Apache Arrow ADBC ${version} RC${rc_number}" "tmp/${tag}"
+    if [[ "${DRY_RUN}" = 0 ]]; then

Review Comment:
   Bash uses `-eq` for number comparison. 
   
   ```suggestion
       if [[ ${DRY_RUN} -eq 0 ]]; then
   ```



-- 
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