kevinjqliu commented on code in PR #202:
URL: https://github.com/apache/iceberg-go/pull/202#discussion_r1841065941


##########
.github/workflows/rc.yml:
##########
@@ -42,17 +42,25 @@ jobs:
       - name: Prepare for tag
         if: github.ref_type == 'tag'
         run: |
-          version=${GITHUB_REF_NAME%-rc}
-          version=${version#v}
-          rc=${GITHUB_REF_NAME#*-rc}
+          # Remove the 'v' prefix and any '-rc' suffix from the tag name to 
isolate the version number
+          # For a tag like 'v0.1.0-rc1', this will result in '0.1.0'
+          version=${GITHUB_REF_NAME#v}
+          version=${version%-rc*}
+          # Finds the last occurrence of `-rc` and returns everything after it
+          # For a tag like 'v0.1.0-rc1', this will result in '1'
+          rc=${GITHUB_REF_NAME##*-rc}
           echo "VERSION=${version}" >> ${GITHUB_ENV}
           echo "RC=${rc}" >> ${GITHUB_ENV}
+          echo "VERSION=${version}"
+          echo "RC=${rc}"

Review Comment:
   added for debugging



-- 
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-unsubscr...@iceberg.apache.org

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


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

Reply via email to