diff options
| author | Carlos Maiolino <[email protected]> | 2026-05-02 14:09:27 +0200 |
|---|---|---|
| committer | Carlos Maiolino <[email protected]> | 2026-05-02 14:09:27 +0200 |
| commit | 296c6b9ee85209c0ce375717e30686545baea107 (patch) | |
| tree | f0da71650e8f58ca528589ad4e39476732fa5b88 /bin/xfs-release.sh | |
| parent | b2e1a1cb259e482720430ff9898d2e564ee73d0f (diff) | |
Diffstat (limited to 'bin/xfs-release.sh')
| -rwxr-xr-x | bin/xfs-release.sh | 118 |
1 files changed, 0 insertions, 118 deletions
diff --git a/bin/xfs-release.sh b/bin/xfs-release.sh deleted file mode 100755 index 105c4a6..0000000 --- a/bin/xfs-release.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/bash - -#Maintainer info -MAINTAINER_EMAIL="[email protected]" -MAINTAINER_NAME="Carlos Maiolino" - -SOURCE=$PWD - -#Files -VERSION_FILE="$SOURCE/VERSION" -CONFIGURE_FILE="$SOURCE/configure.ac" -DEBIAN_FILE="$SOURCE/debian/changelog" -CHANGES_FILE="$SOURCE/doc/CHANGES" - -VER_MAJ="$1" -VER_MIN="$2" -VER_REV="$3" - -REL_VER="$VER_MAJ.$VER_MIN.$VER_REV" -REL_TAG="v$VER_MAJ.$VER_MIN.$VER_REV" - -#OLD_VER here points to the previous released tag -OLD_TAG=$4 - -usage() { - echo "./xfsprogs_release.sh <mav_ver> <min_ver> <revision> <old_git_tag>" - exit -} - -## UPDATE VERSIONING ## -update_version_file() { - sed -i -e "s/^PKG_MAJOR=.*/PKG_MAJOR=$VER_MAJ/" $VERSION_FILE - sed -i -e "s/^PKG_MINOR=.*/PKG_MINOR=$VER_MIN/" $VERSION_FILE - sed -i -e "s/^PKG_REVISION=.*/PKG_REVISION=$VER_REV/" $VERSION_FILE -} - -update_configure_file() { - CONF_AC="AC_INIT([xfsprogs],[$REL_VER],[[email protected]])" - sed -i "s/^AC_INIT.*/$CONF_AC/" $CONFIGURE_FILE -} - -# Update is done in 'reverse order', so the script can always update the first -# line of the file, just to KISS. -update_debian_changelog() { - sed -i "1s/^/\n/" $DEBIAN_FILE - sed -i "1s/^/ -- Nathan Scott <[email protected]> $(date -R)\n/" $DEBIAN_FILE - sed -i "1s/^/\n/" $DEBIAN_FILE - - sed -i "1s/^/ * New upstream release\n/" $DEBIAN_FILE - sed -i "1s/^/\n/" $DEBIAN_FILE - sed -i "1s/^/xfsprogs ($VER_MAJ.$VER_MIN.$VER_REV) unstable; urgency=low\n/" $DEBIAN_FILE -} - -update_changes_file() { - - TMP_FILE=$(mktemp) - git log --oneline --reverse --format="%s (%an)" $OLD_TAG.. > $TMP_FILE - - while read -r line; do - sed -i "1s/^/\t$line\n/" $CHANGES_FILE - done < $TMP_FILE - - rm -f $TMP_FILE -} - -create_signed_tag() { - git tag -s -u $MAINTAINER_EMAIL -m "Release $REL_RAG" $REL_TAG -} - -create_and_push_tarball() { - kup put xfsprogs-$REL_VER.tar.gz xfsprogs-$REL_VER.tar.sign \ - pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-$REL_VER.tar.gz -} - -is_xfsprogs_repo() { - if [ -a $SOURCE/README ] && \ - [ "$(head -1 $SOURCE/README)" == "XFS User Tools README" ]; then - return 0 - else - echo "Current dir not a xfsprogs repository" - usage - exit 1 - fi -} - - -### PROGRAM STARTS HERE ### -# Ensure we are withing a xfsprogs repository: -is_xfsprogs_repo - -# MAJ, MIN, REV, OLD_TAG -if [ $# -ne 4 ]; then - echo "Invalid number of arguments" - usage - exit 1 -fi - -# Update files for new release - -#echo "Updating config.ac file..." -#update_configure_file -#echo "...done" -#echo -#echo "Updating debian changelog..." -#update_debian_changelog -#echo "...done" -#echo -#echo "Updating VERSION file..." -#update_version_file -#echo "...done" -#echo - -#echo "Commiting changes..." -#git add $VERSION_FILE $CONFIGURE_FILE $DEBIAN_FILE -# -#git commit -s -m "xfsprogs: Release $REL_TAG" \ -#-m "Update all the necessary files for a $REL_TAG release." -update_changes_file |
