Skip to content

Commit c3afbd2

Browse files
committed
PARQUET-184: Add release scripts.
These help with the release process, which is roughly: * `sh dev/release-prepare.sh <version>` * `mvn release:perform` * `sh dev/source-release.sh <version> <rc-num>` * Send a vote e-mail The documentation is posted here: https://github.com/rdblue/incubator-parquet-site/blob/release-docs/site/source/how-to-release.html.md Author: Ryan Blue <blue@apache.org> Closes #20 from rdblue/PARQUET-184-add-release-scripts and squashes the following commits: e17a447 [Ryan Blue] PARQUET-184: Update tags based on review feedback. cb5637e [Ryan Blue] PARQUET-184: Add release scripts.
1 parent 8e1223c commit c3afbd2

File tree

2 files changed

+113
-0
lines changed

2 files changed

+113
-0
lines changed

dev/release-prepare.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
#
20+
21+
version=$1
22+
23+
if [ -z "$version" ]; then
24+
echo "Usage: $0 <version>"
25+
exit
26+
fi
27+
28+
tag=apache-parquet-format-$version-incubating
29+
30+
mvn release:clean
31+
mvn release:prepare -Dtag=$tag -DreleaseVersion=$version
32+
33+
echo "Finish staging binary artifacts by running: mvn release:perform"

dev/source-release.sh

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#!/bin/bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
#
20+
21+
version=$1
22+
rc=$2
23+
24+
if [ -z "$version" ]; then
25+
echo "Usage: $0 <version> <rc-num>"
26+
exit
27+
fi
28+
29+
if [ -z "$rc" ]; then
30+
echo "Usage: $0 <version> <rc-num>"
31+
exit
32+
fi
33+
34+
if [ -d tmp/ ]; then
35+
echo "Cannot run: tmp/ exists"
36+
exit
37+
fi
38+
39+
tag=apache-parquet-format-$version-incubating
40+
tagrc=${tag}-rc${rc}
41+
42+
echo "Preparing source for $tagrc"
43+
44+
release_hash=`git rev-list $tag 2> /dev/null | head -n 1 `
45+
46+
if [ -z "$release_hash" ]; then
47+
echo "Cannot continue: unknown git tag: $tag"
48+
exit
49+
fi
50+
51+
echo "Using commit $release_hash"
52+
53+
tarball=$tag.tar.gz
54+
55+
# be conservative and use the release hash, even though git produces the same
56+
# archive (identical hashes) using the scm tag
57+
git archive $release_hash --prefix $tag/ -o $tarball
58+
59+
# sign the archive
60+
gpg --armor --output ${tarball}.asc --detach-sig $tarball
61+
gpg --print-md MD5 $tarball > ${tarball}.md5
62+
shasum $tarball > ${tarball}.sha
63+
64+
# check out the parquet RC folder
65+
svn co --depth=empty https://dist.apache.org/repos/dist/dev/incubator/parquet tmp
66+
67+
# add the release candidate for the tag
68+
mkdir -p tmp/$tagrc
69+
cp ${tarball}* tmp/$tagrc
70+
svn add tmp/$tagrc
71+
svn ci -m "Apache Parquet Format (Incubating) $version RC${rc}" tmp/$tagrc
72+
73+
# clean up
74+
rm -rf tmp
75+
76+
echo "Success! The release candidate is available here:"
77+
echo " https://dist.apache.org/repos/dist/dev/incubator/parquet/$tagrc"
78+
echo ""
79+
echo "Commit SHA1: $release_hash"
80+

0 commit comments

Comments
 (0)