Skip to content

Commit 28c4800

Browse files
authored
Add some scripts to help release (#2522)
## Which issue does this PR close? - Closes #2512 ## What changes are included in this PR? - Add create_rc.sh to create RC source artifacts, signatures, checksums, optional SVN upload, RC tag creation, and draft VOTE email output. - Add verify_rc.sh to verify RC artifacts locally or from ASF dev dist, with optional GPG key import disabled by default. - Add release.sh to promote an approved RC by creating the final release tag and moving SVN artifacts from dev dist to release dist. - Add dependencies.sh for dependency license checks and dependency list generation using cargo metadata. - Move release documentation to the new dev/release workflow and update website release instructions. - Remove all files under the old scripts directory. - Update CI path filters to ignore dev/release/**. - Update deny.toml license exceptions for current dependencies. ## Are these changes tested? Yes, locally without committing.
1 parent 9673e14 commit 28c4800

12 files changed

Lines changed: 1860 additions & 337 deletions

File tree

.github/workflows/bindings_python_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ on:
2525
paths:
2626
- '**' # Include all files and directories in the repository by default.
2727
- '!.github/ISSUE_TEMPLATE/**' # Exclude files and directories that don't impact tests or code like templates, metadata, and documentation.
28-
- '!scripts/**'
28+
- '!dev/release/**'
2929
- '!website/**'
3030
- '!.asf.yml'
3131
- '!.gitattributes'

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ on:
2525
paths:
2626
- '**' # Include all files and directories in the repository by default.
2727
- '!.github/ISSUE_TEMPLATE/**' # Exclude files and directories that don't impact tests or code like templates, metadata, and documentation.
28-
- '!scripts/**'
28+
- '!dev/release/**'
2929
- '!website/**'
3030
- '!.asf.yml'
3131
- '!.gitattributes'

deny.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ allow = [
3737
exceptions = [
3838
# The MPL license is allowed (binary-only):
3939
# https://www.apache.org/legal/resolved.html#category-b
40-
{ allow = ["MPL-2.0"], crate = "webpki-roots" },
40+
{ allow = ["MPL-2.0"], crate = "colored" },
4141
{ allow = ["MPL-2.0"], crate = "generational-arena" },
4242
{ allow = ["MPL-2.0"], crate = "option-ext" },
4343
]

dev/release/README.md

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
<!--
2+
~ Licensed to the Apache Software Foundation (ASF) under one
3+
~ or more contributor license agreements. See the NOTICE file
4+
~ distributed with this work for additional information
5+
~ regarding copyright ownership. The ASF licenses this file
6+
~ to you under the Apache License, Version 2.0 (the
7+
~ "License"); you may not use this file except in compliance
8+
~ with the License. You may obtain a copy of the License at
9+
~
10+
~ http://www.apache.org/licenses/LICENSE-2.0
11+
~
12+
~ Unless required by applicable law or agreed to in writing,
13+
~ software distributed under the License is distributed on an
14+
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
~ KIND, either express or implied. See the License for the
16+
~ specific language governing permissions and limitations
17+
~ under the License.
18+
-->
19+
20+
# Release Helpers
21+
22+
These scripts support local Apache Iceberg Rust release candidate creation and verification.
23+
24+
## Create an RC
25+
26+
```shell
27+
dev/release/create_rc.sh 0.9.1 2
28+
```
29+
30+
This creates:
31+
32+
- source archive `dist/apache-iceberg-rust-0.9.1-rc2/apache-iceberg-rust-0.9.1.tar.gz`
33+
- detached signature `.asc`
34+
- SHA-512 checksum `.sha512`
35+
- signed annotated tag `v0.9.1-rc.2`
36+
37+
The license header check runs against the generated source archive, not the live Git worktree. The optional SVN upload runs after local artifact verification and before RC tag creation. The signed RC tag is created as the final release step, then the script prints a draft VOTE email for `dev@iceberg.apache.org`. The script logs every step before it runs and after it succeeds. If a step fails, it prints the failed step and stops.
38+
39+
Common options:
40+
41+
```shell
42+
dev/release/create_rc.sh 0.9.1 2 --release_ref <commit-ish>
43+
dev/release/create_rc.sh 0.9.1 2 --create_rc_tag 0 --sign 0
44+
dev/release/create_rc.sh 0.9.1 2 --upload_svn 1
45+
dev/release/create_rc.sh 0.9.1 2 --check_headers 0 --check_deps 0
46+
```
47+
48+
Defaults:
49+
50+
- `--release_ref HEAD`: git commit-ish to archive and tag.
51+
- `--dist_dir dist`: artifact output root.
52+
- `--create_rc_tag 1`: create the signed annotated RC tag as the final release step.
53+
- `--check_headers 1`: check Apache license headers against the source archive.
54+
- `--check_deps 1`: run dependency license checks before artifact creation.
55+
- `--sign 1`: create and verify the detached GPG signature.
56+
- `--upload_svn 0`: upload RC artifacts to the ASF dev dist SVN repository.
57+
- `--svn_dist_url https://dist.apache.org/repos/dist/dev/iceberg`: SVN directory URL where the RC artifact directory will be uploaded.
58+
59+
`--sign 1` or `--create_rc_tag 1` requires a local GPG secret key. See the website's GPG setup guide before creating a real release candidate.
60+
61+
`--check_deps 1` requires `cargo-deny`. Install it with:
62+
63+
```shell
64+
cargo install cargo-deny
65+
```
66+
67+
## Verify an RC
68+
69+
```shell
70+
dev/release/verify_rc.sh 0.9.1 2
71+
```
72+
73+
By default this downloads from `https://dist.apache.org/repos/dist/dev/iceberg/apache-iceberg-rust-0.9.1-rc2/`, verifies checksum and signature with the local GPG keyring, checks source headers, and runs Rust and Python build/tests.
74+
75+
To verify artifacts already created under local `dist/`:
76+
77+
```shell
78+
dev/release/verify_rc.sh 0.9.1 2 --download 0
79+
```
80+
81+
Common options:
82+
83+
```shell
84+
dev/release/verify_rc.sh 0.9.1 2 --verify_signature 0
85+
dev/release/verify_rc.sh 0.9.1 2 --import_gpg_keys 1
86+
dev/release/verify_rc.sh 0.9.1 2 --build 0 --python 0 --check_headers 0
87+
```
88+
89+
Defaults:
90+
91+
- `--dist_dir dist`: local artifact root used when `--download 0`.
92+
- `--download 1`: download artifacts from ASF dev dist.
93+
- `--verify_signature 1`: verify the `.asc` signature with the local GPG keyring.
94+
- `--import_gpg_keys 0`: download and import Apache Iceberg release keys before signature verification.
95+
- `--check_headers 1`: check Apache license headers against the extracted source archive.
96+
- `--build 1`: build and test the Rust source distribution.
97+
- `--python 1`: build and test pyiceberg-core.
98+
- `--tmp_dir <auto>`: verification sandbox; auto-created and deleted on success when omitted.
99+
100+
## Promote an RC to a Release
101+
102+
After the VOTE passes, convert the approved RC to the official release:
103+
104+
```shell
105+
dev/release/release.sh 0.9.1 2
106+
```
107+
108+
This creates the signed annotated final release tag `v0.9.1` from the RC tag `v0.9.1-rc.2`, then moves the ASF SVN artifacts from `dev/iceberg/apache-iceberg-rust-0.9.1-rc2` to `release/iceberg/apache-iceberg-rust-0.9.1`.
109+
110+
Common options:
111+
112+
```shell
113+
dev/release/release.sh 0.9.1 2 --create_release_tag 0
114+
dev/release/release.sh 0.9.1 2 --move_svn 0
115+
```
116+
117+
Defaults:
118+
119+
- `--create_release_tag 1`: create the signed annotated final release git tag.
120+
- `--move_svn 1`: move the RC artifacts from ASF dev dist to ASF release dist.
121+
- `--tag_ref <rc tag commit>`: git commit-ish to tag as the final release.
122+
- `--dev_dist_url https://dist.apache.org/repos/dist/dev/iceberg`: SVN directory URL containing RC artifact directories.
123+
- `--release_dist_url https://dist.apache.org/repos/dist/release/iceberg`: SVN directory URL where final release artifact directories are published.
124+
125+
The script does not push the final release tag. Push it manually after reviewing the output:
126+
127+
```shell
128+
git push origin "v0.9.1"
129+
```
130+
131+
## Dependencies
132+
133+
Use the dependency helper to update or verify dependency license lists:
134+
135+
```shell
136+
dev/release/dependencies.sh generate
137+
dev/release/dependencies.sh check
138+
```

0 commit comments

Comments
 (0)