Implementation:Apache Spark Release Tag
| Knowledge Sources | |
|---|---|
| Domains | Release_Engineering |
| Type | API Doc |
| Last Updated | 2026-02-08 12:00 GMT |
Overview
Shell script that creates a signed git release tag for Apache Spark and bumps version numbers for the next development cycle.
Description
release-tag.sh clones the release branch, updates version numbers across all build files (Maven POMs, Python setup.py, R DESCRIPTION, documentation), creates a signed git tag (e.g., v3.5.0-rc1), then commits the next SNAPSHOT version. It uses ASF (Apache Software Foundation) credentials for authenticated git push to the Apache repository.
The script performs the following operations in sequence:
- Clone and checkout: Clones the Apache Spark repository and checks out the specified release branch.
- Set release version: Updates version numbers in all build files to the release version using utility functions from
release-util.sh. - Commit release version: Creates a git commit with the release version changes.
- Create signed tag: Creates a GPG-signed git tag at the release version commit.
- Set next development version: Updates all version numbers to the next SNAPSHOT version.
- Commit next version: Creates a git commit with the SNAPSHOT version bump.
- Push: Pushes both the tag and the version bump commits to the Apache repository using ASF credentials.
The version update process handled by release-util.sh (lines 55-73, 244-258) ensures consistency across the polyglot build system, updating Maven POMs, Python version files, R package metadata, and documentation configuration simultaneously.
Usage
Run as part of the release process (typically called by do-release-docker.sh). Requires ASF credentials and git configuration. Should not normally be run standalone unless debugging the tagging process.
Code Reference
Source Location
- Repository: apache/spark
- Files:
dev/create-release/release-tag.sh(lines 1-145)dev/create-release/release-util.sh(lines 55-73, 244-258)
Required Environment Variables
| Variable | Description | Example |
|---|---|---|
RELEASE_VERSION |
Version being released | 3.5.0
|
RELEASE_TAG |
Git tag name | v3.5.0-rc1
|
NEXT_VERSION |
Next development version | 3.5.1-SNAPSHOT
|
GIT_BRANCH |
Release branch name | branch-3.5
|
ASF_USERNAME |
Apache credentials username | (ASF ID) |
ASF_PASSWORD |
Apache credentials password | (ASF password) |
GIT_NAME |
Git committer name | Release Manager
|
GIT_EMAIL |
Git committer email | rm@apache.org
|
Version Update Targets
The script updates version numbers in the following files:
| Target | Files Modified | Tool Used |
|---|---|---|
| Maven POMs | All pom.xml files |
Maven versions plugin |
| Python | python/pyspark/version.py, python/setup.py |
sed/shell |
| R | R/pkg/DESCRIPTION |
sed/shell |
| Documentation | docs/_config.yml |
sed/shell |
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| Release version strings | environment variables | Yes | RELEASE_VERSION, RELEASE_TAG, NEXT_VERSION
|
| ASF credentials | environment variables | Yes | ASF_USERNAME, ASF_PASSWORD for authenticated git push
|
| Git branch name | environment variable | Yes | GIT_BRANCH specifying the release branch
|
| Git identity | environment variables | Yes | GIT_NAME, GIT_EMAIL for commit authorship
|
| GPG key | GPG keyring | Yes | For creating signed tags |
Outputs
| Name | Type | Description |
|---|---|---|
| Git tag | git tag | Signed tag (e.g., v3.5.0-rc1) pushed to the Apache repository
|
| Version bump commits | git commits | Commits updating all POMs, R, Python, and docs to the next SNAPSHOT version |
Usage Examples
Typical Invocation (via do-release.sh)
RELEASE_VERSION=3.5.0 \
RELEASE_TAG=v3.5.0-rc1 \
NEXT_VERSION=3.5.1-SNAPSHOT \
GIT_BRANCH=branch-3.5 \
ASF_USERNAME=myasfid \
ASF_PASSWORD=mypassword \
GIT_NAME="Release Manager" \
GIT_EMAIL="rm@apache.org" \
dev/create-release/release-tag.sh