]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tools: improve ko-release-* scripts
authorKarel Zak <kzak@redhat.com>
Fri, 30 Mar 2012 11:43:45 +0000 (13:43 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 30 Mar 2012 11:44:11 +0000 (13:44 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
tools/ko-release-gen
tools/ko-release-push

index 92b3f7a58e182e12b7dcad3a0a5664ed56b41988..58f05415d6c865e9866b28c28c34d80a2469b438 100755 (executable)
@@ -23,7 +23,8 @@ cd "$(git rev-parse --show-toplevel)" || {
        echo "error: cannot found version file (call make distcheck)"
 
 VERSION=$(cat .version)
-VERSION_MAJOR=$(echo $VERSION | sed 's/-rc[0-9]//')
+VERSION_MAJOR=$(echo $VERSION | sed 's/-rc[0-9]//; s/\(.*\..*\)\..*/\1/')
+VERSION_DOCS=$(echo $VERSION | sed 's/-rc[0-9]//')
 DISTDIR=${1:-"kernel.org"}/v${VERSION_MAJOR}
 
 GPG_CMD="gpg --use-agent --armor --detach-sign --quiet"
@@ -80,7 +81,7 @@ eval $(gpg-agent --daemon)
 
 add_file       util-linux-${VERSION}.tar.xz
 add_file       v${VERSION}-ChangeLog
-add_file       Documentation/releases/v${VERSION_MAJOR}-ReleaseNotes
+add_file       Documentation/releases/v${VERSION_DOCS}-ReleaseNotes
 add_html_dir   libmount/docs/html libmount-docs
 add_html_dir   libblkid/docs/html libblkid-docs
 
index ebeddbb632119b7420a598255f132b43c3ca521d..f08954fc14c361211117617dce01451e5ff547c7 100755 (executable)
@@ -20,7 +20,7 @@ cd "$(git rev-parse --show-toplevel)" || {
        echo "error: cannot found version file (call make distcheck)"
 
 VERSION=${2:-$(cat .version)}
-VERSION_MAJOR=$(echo $VERSION | sed 's/-rc[0-9]//')
+VERSION_MAJOR=$(echo $VERSION | sed 's/-rc[0-9]//; s/\(.*\..*\)\..*/\1/')
 BASEDIR=${1:-"kernel.org"}
 DISTDIR="${BASEDIR}/v${VERSION_MAJOR}"