[KYUUBI #6061] Delete svn staging dir before checking out

# 🔍 Description
## Issue References 🔗

The release process will fail with the following errors if `SVN_STAGING_DIR`(`${KYUUBI_DIR}/work/svn-dev"`) exist.
```
+ upload_svn_staging
+ svn checkout --depth=empty https://dist.apache.org/repos/dist/dev/kyuubi /home/ubuntu/apache-kyuubi/work/svn-dev
svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LC_CTYPE is UTF-8
svn: warning: please check that your locale name is correct
svn: E155016: The working copy database at '/home/ubuntu/apache-kyuubi/work/svn-dev' is missing.
```

## Describe Your Solution 🔧

Delete `SVN_STAGING_DIR` before checking out

## Types of changes 🔖

- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

Manually test.

---

# Checklist 📝

- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6061 from pan3793/release-rm.

Closes #6061

3a9d51e89 [Cheng Pan] Delete svn staging dir before checking out

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
This commit is contained in:
Cheng Pan 2024-02-20 10:08:34 +08:00
parent 06cc3dbd95
commit 9d2ea7c896

View File

@ -83,6 +83,7 @@ package() {
}
upload_svn_staging() {
rm -rf "${SVN_STAGING_DIR}"
svn checkout --depth=empty "${SVN_STAGING_REPO}" "${SVN_STAGING_DIR}"
mkdir -p "${SVN_STAGING_DIR}/${RELEASE_TAG}"
rm -f "${SVN_STAGING_DIR}/${RELEASE_TAG}/*"