Skip to content

Commit

Permalink
[SPARK-26554][BUILD][FOLLOWUP] Use GitHub instead of GitBox to check …
Browse files Browse the repository at this point in the history
…HEADER

## What changes were proposed in this pull request?

This PR uses GitHub repository instead of GitBox because GitHub repo returns HTTP header status correctly.

## How was this patch tested?

Manual.

```
$ ./do-release-docker.sh -d /tmp/test -n
Branch [branch-2.4]:
Current branch version is 2.4.1-SNAPSHOT.
Release [2.4.1]:
RC # [1]:
This is a dry run. Please confirm the ref that will be built for testing.
Ref [v2.4.1-rc1]:
```

Closes apache#23482 from dongjoon-hyun/SPARK-26554-2.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 6f35ede)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
  • Loading branch information
dongjoon-hyun authored and kai-chi committed Jul 23, 2019
1 parent 0f0f36f commit d402105
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dev/create-release/release-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ DRY_RUN=${DRY_RUN:-0}
GPG="gpg --no-tty --batch"
ASF_REPO="https://gitbox.apache.org/repos/asf/spark.git"
ASF_REPO_WEBUI="https://gitbox.apache.org/repos/asf?p=spark.git"
ASF_GITHUB_REPO="https://github.com/apache/spark"

function error {
echo "$*"
Expand Down Expand Up @@ -73,9 +74,7 @@ function fcreate_secure {
}

function check_for_tag {
# Check HTML body messages instead of header status codes. Apache GitBox returns
# a header with `200 OK` status code for both existing and non-existing tag URLs
! curl -s --fail "$ASF_REPO_WEBUI;a=commit;h=$1" | grep '404 Not Found' > /dev/null
curl -s --head --fail "$ASF_GITHUB_REPO/releases/tag/$1" > /dev/null
}

function get_release_info {
Expand Down

0 comments on commit d402105

Please sign in to comment.