Commit 152aeb6
authored
infra: release script, validate proper ICEBERG_VERSION variable (#1956)
## Which issue does this PR close?
- Closes #.
## What changes are included in this PR?
Add a check that the input `ICEBERG_VERSION` variable is in the proper
format, i.e. `0.8.0`. Otherwise, the source directory and zip file will
have the wrong name
## Are these changes tested?
Added these 3 lines:
```
echo "Release version: $release_version"
echo "Git branch: $git_branch"
echo "Source directory: apache-iceberg-rust-$release_version"
```
This PR:
```
➜ iceberg-rust git:(kevinjqliu/validate-version) ✗ ICEBERG_VERSION=rc.1 ./scripts/release.sh
var is set to 'rc.1'
Error: ICEBERG_VERSION (rc.1) must be in the format: <number>.<number>.<number>
➜ iceberg-rust git:(kevinjqliu/validate-version) ✗ ICEBERG_VERSION=0.8.0 ./scripts/release.sh
var is set to '0.8.0'
Release version: 0.8.0
Git branch: release-0.8.0-rc.1
Source directory: apache-iceberg-rust-0.8.0
```
main:
```
➜ iceberg-rust git:(kevinjqliu/validate-version) ✗ ICEBERG_VERSION=rc.1 ./scripts/release.sh
var is set to 'rc.1'
Release version: rc.1
Git branch: release-rc.1-rc.1
Source directory: apache-iceberg-rust-rc.1
➜ iceberg-rust git:(kevinjqliu/validate-version) ✗ ICEBERG_VERSION=0.8.0 ./scripts/release.sh
var is set to '0.8.0'
Release version: 0.8.0
Git branch: release-0.8.0-rc.1
Source directory: apache-iceberg-rust-0.8.0
```1 parent de6ffd2 commit 152aeb6
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| |||
0 commit comments