Skip to content

Commit d2b2079

Browse files
dongjoon-hyunkai-chi
authored andcommitted
[SPARK-28496][INFRA] Use branch name instead of tag during dry-run
## What changes were proposed in this pull request? There are two cases when we use `dry run`. First, when the tag already exists, we can ask `confirmation` on the existing tag name. ``` $ dev/create-release/do-release-docker.sh -d /tmp/spark-2.4.4 -n -s docs Output directory already exists. Overwrite and continue? [y/n] y Branch [branch-2.4]: Current branch version is 2.4.4-SNAPSHOT. Release [2.4.4]: 2.4.3 RC # [1]: v2.4.3-rc1 already exists. Continue anyway [y/n]? y This is a dry run. Please confirm the ref that will be built for testing. Ref [v2.4.3-rc1]: ``` Second, when the tag doesn't exist, we had better ask `confirmation` on the branch name. If we do not change the default value, it will fail eventually. ``` $ dev/create-release/do-release-docker.sh -d /tmp/spark-2.4.4 -n -s docs Branch [branch-2.4]: Current branch version is 2.4.4-SNAPSHOT. Release [2.4.4]: RC # [1]: This is a dry run. Please confirm the ref that will be built for testing. Ref [v2.4.4-rc1]: ``` This PR improves the second case by providing the branch name instead. This helps the release testing before tagging. ## How was this patch tested? Manually do the following and check the default value of `Ref` field. ``` $ dev/create-release/do-release-docker.sh -d /tmp/spark-2.4.4 -n -s docs Branch [branch-2.4]: Current branch version is 2.4.4-SNAPSHOT. Release [2.4.4]: RC # [1]: This is a dry run. Please confirm the ref that will be built for testing. Ref [branch-2.4]: ... ``` Closes apache#25240 from dongjoon-hyun/SPARK-28496. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Marcelo Vanzin <[email protected]> (cherry picked from commit cfca26e) Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 13bd07c commit d2b2079

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

dev/create-release/release-util.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ function get_release_info {
150150
GIT_REF="$RELEASE_TAG"
151151
if is_dry_run; then
152152
echo "This is a dry run. Please confirm the ref that will be built for testing."
153+
if [[ $SKIP_TAG = 0 ]]; then
154+
GIT_REF="$GIT_BRANCH"
155+
fi
153156
GIT_REF=$(read_config "Ref" "$GIT_REF")
154157
fi
155158
export GIT_REF

0 commit comments

Comments
 (0)