Skip to content

Commit b132175

Browse files
authored
[release] Add script for release flink2, spark4 and paimon-iceberg (#6405)
1 parent 23f7ad2 commit b132175

2 files changed

Lines changed: 105 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
CUSTOM_OPTIONS=${CUSTOM_OPTIONS:-}
26+
27+
# fail immediately
28+
set -o errexit
29+
set -o nounset
30+
31+
CURR_DIR=`pwd`
32+
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
33+
PROJECT_ROOT="${BASE_DIR}/../../"
34+
35+
# Sanity check to ensure that resolved paths are valid; a LICENSE file should always exist in project root
36+
if [ ! -f ${PROJECT_ROOT}/LICENSE ]; then
37+
echo "Project root path ${PROJECT_ROOT} is not valid; script may be in the wrong directory."
38+
exit 1
39+
fi
40+
41+
###########################
42+
43+
cd ${PROJECT_ROOT}
44+
45+
echo "Building flink2 and iceberg modules"
46+
${MVN} clean install -Pdocs-and-source,flink2 -DskipTests \
47+
-pl org.apache.paimon:paimon-flink-2.0,org.apache.paimon:paimon-flink-2.1,org.apache.paimon:paimon-iceberg -am $CUSTOM_OPTIONS
48+
49+
echo "Deploying flink2 and iceberg modules to repository.apache.org"
50+
${MVN} deploy -Papache-release,docs-and-source,flink2 -DskipTests -DretryFailedDeploymentCount=10 \
51+
-pl org.apache.paimon:paimon-flink-2.0,org.apache.paimon:paimon-flink-2.1,org.apache.paimon:paimon-flink2-common,org.apache.paimon:paimon-iceberg $CUSTOM_OPTIONS
52+
53+
cd ${CURR_DIR}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
CUSTOM_OPTIONS=${CUSTOM_OPTIONS:-}
26+
27+
# fail immediately
28+
set -o errexit
29+
set -o nounset
30+
31+
CURR_DIR=`pwd`
32+
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
33+
PROJECT_ROOT="${BASE_DIR}/../../"
34+
35+
# Sanity check to ensure that resolved paths are valid; a LICENSE file should always exist in project root
36+
if [ ! -f ${PROJECT_ROOT}/LICENSE ]; then
37+
echo "Project root path ${PROJECT_ROOT} is not valid; script may be in the wrong directory."
38+
exit 1
39+
fi
40+
41+
###########################
42+
43+
cd ${PROJECT_ROOT}
44+
45+
echo "Building spark4 module"
46+
${MVN} clean install -Pdocs-and-source,spark4 -DskipTests -pl paimon-spark/paimon-spark-4.0 -am $CUSTOM_OPTIONS
47+
48+
echo "Deploying spark4 module to repository.apache.org"
49+
${MVN} deploy -Papache-release,docs-and-source,spark4 -DskipTests -DretryFailedDeploymentCount=10 \
50+
-pl org.apache.paimon:paimon-spark-common_2.13,org.apache.paimon:paimon-spark4-common,org.apache.paimon:paimon-spark-4.0 $CUSTOM_OPTIONS
51+
52+
cd ${CURR_DIR}

0 commit comments

Comments
 (0)