bip-release script can now handle an optional release name
This release name is used in the git tag. The previous 'release' variable was renamed in 'release_version' to avoid confusion.
This commit is contained in:
parent
ca4dd55e71
commit
c34b030e21
@ -7,13 +7,14 @@ if [ ! -d src ] ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
release="$1"
|
release_version="$1"
|
||||||
|
release_name="$2"
|
||||||
: ${MAKEOPTS:=-j -l4}
|
: ${MAKEOPTS:=-j -l4}
|
||||||
|
|
||||||
set_version() {
|
set_version() {
|
||||||
local release
|
local release_version
|
||||||
release="${1}"
|
release_version="${1}"
|
||||||
sed -i -e '/^AC_INIT/s/\(, \[\)[^]]*/\1'${release}'/' configure.ac
|
sed -i -e '/^AC_INIT/s/\(, \[\)[^]]*/\1'${release_version}'/' configure.ac
|
||||||
}
|
}
|
||||||
|
|
||||||
get_version() {
|
get_version() {
|
||||||
@ -35,17 +36,21 @@ make_distcheck() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
git log > ChangeLog
|
git log > ChangeLog
|
||||||
if [ -n "$release" ]; then
|
if [ -n "$release_version" ]; then
|
||||||
set_version "${release}"
|
set_version "${release_version}"
|
||||||
make_distcheck || exit 1
|
make_distcheck || exit 1
|
||||||
|
|
||||||
git commit -a -m "Update version and ChangeLog for bip-${release} release."
|
git commit -a -m "Update version and ChangeLog for bip-${release_version} release."
|
||||||
git tag -s release-$release
|
TAG_COMMENT="Release ${release_version}"
|
||||||
|
if [ -n "${release_name}" ]; then
|
||||||
|
TAG_COMMENT="${TAG_COMMENT} '${release_name}'"
|
||||||
|
fi
|
||||||
|
git tag -s -m "${TAG_COMMENT}" release-${release_version}
|
||||||
|
|
||||||
set_version "${release}-git"
|
set_version "${release_version}-git"
|
||||||
git commit -a -m "Add -git to version string."
|
git commit -a -m "Add -git to version string."
|
||||||
|
|
||||||
echo "See bip-${release}.tar.gz"
|
echo "See bip-${release_version}.tar.gz"
|
||||||
else
|
else
|
||||||
make_distcheck || exit 1
|
make_distcheck || exit 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user