[go: up one dir, main page]

File: pool-release.sh

package info (click to toggle)
commons-pool2 2.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,800 kB
  • sloc: java: 16,179; xml: 2,670; sh: 32; makefile: 2
file content (65 lines) | stat: -rwxr-xr-x 2,770 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -----------------------------------------------------------------------------
# Performs the local svn steps necessary to publish a pool release.
#
# Preconditions:
# 0) Successful release VOTE has completed, based on artifacts in rc_path
#    (checkout of https://dist.apache.org/repos/dist/dev/commons/pool)
# 1) release_path points to a local checkout of
#     https://dist.apache.org/repos/dist/release/commons/pool
# 2) RELEASE-NOTES.txt for the new release is in top level of rc_path
#
# NOTE: This script does not commit the local changes to actually publish
# the artifacts.
# 
# -----------------------------------------------------------------------------
# Set script variables
version=2.12.0        # version being released
last_version=2.11.1   # previous version, will be replaced in README.html
rc_name=2.12.0-RC5    # subdirectory of /dist/dev/commons/pool containing final RC
rc_path=${HOME}/pool-tag/commons-pool/target/commons-release-plugin/scm/${rc_name}  # checkout of https://dist.apache.org/repos/dist/dev/commons/pool
release_path=${HOME}/pool #checkout of https://dist.apache.org/repos/dist/release/commons/pool
#
# Move release notes
cp $rc_path/RELEASE-NOTES.txt $release_path
#
# Update README.html
# sed -i "" "s/$last_version/$version/g" $release_path/README.html
#   OSX  ^^ required suffix
sed -i "s/$last_version/$version/g" $release_path/README.html
#
# Move release artifacts
svn mv $rc_path/source/*${version}* $release_path/source
svn mv $rc_path/binaries/*${version}* $release_path/binaries
#
# Drop artifacts from the last release
cd $release_path/source
for file in *${last_version}*; do svn rm $file; done
cd $release_path/binaries
for file in *${last_version}*; do svn rm $file; done
#
# Drop RC directory
svn rm $rc_path

echo "Local svn changes complete."
echo "Inspect the files in $release_path and commit to publish the release."
echo "Also make sure that the rc_name directory in the /dist/dev checkout has been removed."