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
11 # http://www.apache.org/licenses/LICENSE-2.0
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
22 SOURCE_DIR
="$( cd "$
( dirname "${BASH_SOURCE[0]}" )" && pwd )"
24 if [ "$#" -ne 2 ]; then
25 echo "Usage: $0 <version> <next_version>"
30 : ${BUMP_VERSION_POST_TAG:=${BUMP_DEFAULT}}
31 : ${BUMP_DEB_PACKAGE_NAMES:=${BUMP_DEFAULT}}
33 .
$SOURCE_DIR/utils-prepare.sh
37 next_version_snapshot
="${next_version}-SNAPSHOT"
39 if [ ${BUMP_VERSION_POST_TAG} -gt 0 ]; then
40 echo "Updating versions for ${next_version_snapshot}"
41 update_versions
"${version}" "${next_version}" "snapshot"
42 git commit
-m "[Release] Update versions for ${next_version_snapshot}"
45 if [ ${BUMP_DEB_PACKAGE_NAMES} -gt 0 ]; then
46 echo "Updating .deb package names for ${next_version}"
49 local major_version
=$
(echo $version |
sed -E -e 's/^([0-9]+)\.[0-9]+\.[0-9]+$/\1/')
50 local minor_version
=$
(echo $version |
sed -E -e 's/^[0-9]+\.([0-9]+)\.[0-9]+$/\1/')
51 expr ${major_version} \
* 100 + ${minor_version}
53 deb_lib_suffix
=$
(so_version
$version)
54 next_deb_lib_suffix
=$
(so_version
$next_version)
55 if [ "${deb_lib_suffix}" != "${next_deb_lib_suffix}" ]; then
56 cd $SOURCE_DIR/..
/tasks
/linux-packages
/apache-arrow
57 for target
in debian
*/lib
*${deb_lib_suffix}.
install; do
60 $
(echo $target |
sed -e "s/${deb_lib_suffix}/${next_deb_lib_suffix}/")
62 deb_lib_suffix_substitute_pattern
="s/(lib(arrow|gandiva|parquet|plasma)[-a-z]*)${deb_lib_suffix}/\\1${next_deb_lib_suffix}/g"
63 sed -i.bak
-E -e "${deb_lib_suffix_substitute_pattern}" debian
*/control
*
64 rm -f debian
*/control
*.bak
65 git add debian
*/control
*
67 cd $SOURCE_DIR/..
/tasks
/
68 sed -i.bak
-E -e "${deb_lib_suffix_substitute_pattern}" tasks.yml
73 sed -i.bak
-E -e "${deb_lib_suffix_substitute_pattern}" rat_exclude_files.txt
74 rm -f rat_exclude_files.txt.bak
75 git add rat_exclude_files.txt
76 git commit
-m "[Release] Update .deb package names for $next_version"