yaooqinn commented on code in PR #51122:
URL: https://github.com/apache/spark/pull/51122#discussion_r2136782996


##########
dev/create-release/release-build.sh:
##########
@@ -602,6 +602,97 @@ if [[ "$1" == "publish-release" ]]; then
       -H "Content-Type:application/xml" -v \
       $NEXUS_ROOT/profiles/$NEXUS_PROFILE/finish)
     echo "Closed Nexus staging repository: $staged_repo_id"
+
+    echo "Sending the RC vote email"
+    EMAIL_TO="d...@spark.apache.org"
+    EMAIL_SUBJECT="[VOTE] Release Spark ${SPARK_VERSION} (RC${SPARK_RC_COUNT})"
+
+    # Calculate deadline in Pacific Time (PST/PDT)
+    DEADLINE=$(TZ=America/Los_Angeles date -d "+4 days" "+%a, %d %b %Y 
%H:%M:%S %Z")
+
+    
JIRA_API_URL="https://issues.apache.org/jira/rest/api/2/project/SPARK/versions";
+    JIRA_VERSION_ID=$(curl -s "$JIRA_API_URL" | \
+      # Split JSON objects by replacing '},{' with a newline-separated pattern
+      tr '}' '\n' | \
+      # Find the block containing the exact version name
+      grep -F "\"name\":\"$SPARK_VERSION\"" -A 5 | \
+      # Extract the line with "id"
+      grep '"id"' | \
+      # Extract the numeric id value (assuming "id":"123456")
+      sed -E 's/.*"id":"?([0-9]+)"?.*/\1/' | \
+      head -1)
+
+    # Configure msmtp
+    cat > ~/.msmtprc <<EOF
+defaults
+auth           on
+tls            on
+tls_trust_file /etc/ssl/certs/ca-certificates.crt
+logfile        ~/.msmtp.log
+
+account        apache
+host           mail-relay.apache.org
+port           587
+from           $asf_usern...@apache.org
+user           $ASF_USERNAME
+password       $ASF_PASSWORD
+
+account default : apache
+EOF
+
+    chmod 600 ~/.msmtprc
+
+    # Compose and send the email
+    {
+      echo "From: $asf_usern...@apache.org"
+      echo "To: $EMAIL_TO"
+      echo "Subject: $EMAIL_SUBJECT"
+      echo
+      echo "Please vote on releasing the following candidate as Apache Spark 
version ${SPARK_VERSION}."
+      echo
+      echo "The vote is open until ${DEADLINE} and passes if a majority +1 PMC 
votes are cast, with"

Review Comment:
   PMC to PMC Member



-- 
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: reviews-unsubscr...@spark.apache.org

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


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

Reply via email to