Skip to content

Commit 920eb33

Browse files
committed
[infra] Add release guide documentation and update scripts
1 parent f0a13fe commit 920eb33

File tree

11 files changed

+1054
-10
lines changed

11 files changed

+1054
-10
lines changed

tools/releasing/create_binary_release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ fi
5454
cd ..
5555

5656
FLUSS_DIR=`pwd`
57-
RELEASE_DIR=${FLUSS_DIR}/tools/releasing/release
57+
RELEASE_DIR=${FLUSS_DIR}/tools/release
5858
mkdir -p ${RELEASE_DIR}
5959

6060
###########################
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#!/usr/bin/env bash
2+
3+
#
4+
# Licensed to the Apache Software Foundation (ASF) under one
5+
# or more contributor license agreements. See the NOTICE file
6+
# distributed with this work for additional information
7+
# regarding copyright ownership. The ASF licenses this file
8+
# to you under the Apache License, Version 2.0 (the
9+
# "License"); you may not use this file except in compliance
10+
# with the License. You may obtain a copy of the License at
11+
#
12+
# http://www.apache.org/licenses/LICENSE-2.0
13+
#
14+
# Unless required by applicable law or agreed to in writing, software
15+
# distributed under the License is distributed on an "AS IS" BASIS,
16+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
# See the License for the specific language governing permissions and
18+
# limitations under the License.
19+
#
20+
21+
##
22+
## Variables with defaults (if not overwritten by environment)
23+
##
24+
MVN=${MVN:-mvn}
25+
26+
if [ -z "${RELEASE_VERSION:-}" ]; then
27+
echo "RELEASE_VERSION was not set."
28+
exit 1
29+
fi
30+
31+
# fail immediately
32+
set -o errexit
33+
set -o nounset
34+
# print command before executing
35+
set -o xtrace
36+
37+
CURR_DIR=`pwd`
38+
if [[ `basename $CURR_DIR` != "tools" ]] ; then
39+
echo "You have to call the script from the tools/ dir"
40+
exit 1
41+
fi
42+
43+
if [ "$(uname)" == "Darwin" ]; then
44+
SHASUM="shasum -a 512"
45+
# turn off xattr headers in the generated archive file on macOS
46+
TAR_OPTIONS="--no-xattrs"
47+
# Disable the creation of ._* files on macOS.
48+
export COPYFILE_DISABLE=1
49+
else
50+
SHASUM="sha512sum"
51+
TAR_OPTIONS=""
52+
fi
53+
54+
###########################
55+
56+
cd ..
57+
58+
FLUSS_DIR=`pwd`
59+
HELM_RELEASE_DIR=${FLUSS_DIR}/tools/release/helm-chart/${RELEASE_VERSION}-rc${RELEASE_CANDIDATE}
60+
61+
echo "Creating helm chart package"
62+
63+
mkdir -p ${HELM_RELEASE_DIR}
64+
65+
cd ${HELM_RELEASE_DIR}
66+
67+
# create helm package tgz for fluss
68+
helm package ${FLUSS_DIR}/docker/helm
69+
# create prov file for helm package
70+
helm gpg sign fluss-${RELEASE_VERSION}.tgz
71+
72+
# create sha512 and asc files
73+
$SHASUM fluss-${RELEASE_VERSION}.tgz > fluss-${RELEASE_VERSION}.tgz.sha512
74+
$SHASUM fluss-${RELEASE_VERSION}.tgz.prov > fluss-${RELEASE_VERSION}.tgz.prov.sha512
75+
gpg --armor --detach-sig ${HELM_RELEASE_DIR}/fluss-$RELEASE_VERSION.tgz
76+
gpg --armor --detach-sig ${HELM_RELEASE_DIR}/fluss-$RELEASE_VERSION.tgz.prov
77+
78+
# create index.yaml
79+
cd ..
80+
helm repo index .

tools/releasing/create_source_release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fi
5656
cd ..
5757

5858
FLUSS_DIR=`pwd`
59-
RELEASE_DIR=${FLUSS_DIR}/tools/releasing/release
59+
RELEASE_DIR=${FLUSS_DIR}/tools/release
6060
CLONE_DIR=${RELEASE_DIR}/fluss-tmp-clone
6161

6262
echo "Creating source package"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/usr/bin/env bash
2+
3+
#
4+
# Licensed to the Apache Software Foundation (ASF) under one
5+
# or more contributor license agreements. See the NOTICE file
6+
# distributed with this work for additional information
7+
# regarding copyright ownership. The ASF licenses this file
8+
# to you under the Apache License, Version 2.0 (the
9+
# "License"); you may not use this file except in compliance
10+
# with the License. You may obtain a copy of the License at
11+
#
12+
# http://www.apache.org/licenses/LICENSE-2.0
13+
#
14+
# Unless required by applicable law or agreed to in writing, software
15+
# distributed under the License is distributed on an "AS IS" BASIS,
16+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
# See the License for the specific language governing permissions and
18+
# limitations under the License.
19+
#
20+
21+
##
22+
## Variables with defaults (if not overwritten by environment)
23+
##
24+
MVN=${MVN:-mvn}
25+
26+
# fail immediately
27+
set -o errexit
28+
set -o nounset
29+
# print command before executing
30+
set -o xtrace
31+
32+
CURR_DIR=`pwd`
33+
if [[ `basename $CURR_DIR` != "tools" ]] ; then
34+
echo "You have to call the script from the tools/ dir"
35+
exit 1
36+
fi
37+
38+
###########################
39+
COMMON_OPTIONS="-Prelease -DskipTests -DretryFailedDeploymentCount=10 "
40+
41+
cd ..
42+
43+
echo "Deploying to repository.apache.org"
44+
$MVN clean deploy $COMMON_OPTIONS
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/usr/bin/env bash
2+
3+
#
4+
# Licensed to the Apache Software Foundation (ASF) under one
5+
# or more contributor license agreements. See the NOTICE file
6+
# distributed with this work for additional information
7+
# regarding copyright ownership. The ASF licenses this file
8+
# to you under the Apache License, Version 2.0 (the
9+
# "License"); you may not use this file except in compliance
10+
# with the License. You may obtain a copy of the License at
11+
#
12+
# http://www.apache.org/licenses/LICENSE-2.0
13+
#
14+
# Unless required by applicable law or agreed to in writing, software
15+
# distributed under the License is distributed on an "AS IS" BASIS,
16+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
# See the License for the specific language governing permissions and
18+
# limitations under the License.
19+
#
20+
21+
##
22+
## Variables with defaults (if not overwritten by environment)
23+
##
24+
MVN=${MVN:-mvn}
25+
26+
# fail immediately
27+
set -o errexit
28+
set -o nounset
29+
# print command before executing
30+
set -o xtrace
31+
32+
CURR_DIR=`pwd`
33+
if [[ `basename $CURR_DIR` != "tools" ]] ; then
34+
echo "You have to call the script from the tools/ dir"
35+
exit 1
36+
fi
37+
38+
###########################
39+
40+
OLD_VERSION=${OLD_VERSION}
41+
NEW_VERSION=${NEW_VERSION}
42+
43+
44+
if [ -z "${OLD_VERSION}" ]; then
45+
echo "OLD_VERSION is unset"
46+
exit 1
47+
fi
48+
49+
if [ -z "${NEW_VERSION}" ]; then
50+
echo "NEW_VERSION is unset"
51+
exit 1
52+
fi
53+
54+
cd ..
55+
56+
#change version in all pom files
57+
find . -name 'pom.xml' -type f -exec perl -pi -e 's#<version>'$OLD_VERSION'</version>#<version>'$NEW_VERSION'</version>#; s#-'$OLD_VERSION'</version>#-'$NEW_VERSION'</version>#' {} \;
58+
59+
git commit -am "Update version to $NEW_VERSION"
60+
61+
echo "Don't forget to push the change."

0 commit comments

Comments
 (0)