1#!/bin/sh -eu 2# SPDX-License-Identifier: GPL-2.0-or-later 3# Copyright (c) 2023 Petr Vorel <pvorel@suse.cz> 4# Tag LTP release. 5# https://github.com/linux-test-project/ltp/wiki/LTP-Release-Procedure 6 7basedir="$(dirname "$0")" 8cd "$basedir/.." 9. "$basedir/lib.sh" 10 11upstream_git="linux-test-project/ltp" 12tag="$(date +%Y%m%d)" 13old_tag="$(git describe --abbrev=0)" 14tag_msg="LTP $tag" 15 16if ! git ls-remote --get-url origin | grep -q $upstream_git; then 17 quit "Not an upstream project" 18fi 19 20if ! git --no-pager diff --exit-code; then 21 quit "Please commit your changes before making new release" 22fi 23 24if git show $tag 2> /dev/null; then 25 quit "Tag '$tag' already exists" 26fi 27 28if grep -q "$tag" VERSION; then 29 quit "Tag '$tag' already in VERSION file" 30fi 31 32title "git tag" 33echo "new tag: '$tag', previous tag: '$old_tag'" 34echo "$tag" > VERSION 35git add VERSION 36rod git commit -S --signoff --message \"$tag_msg\" VERSION 37rod git tag --sign --annotate $tag --message \"$tag_msg\" 38git --no-pager show $tag --show-signature 39 40ask "Please check tag and signature" 41 42title "git push" 43ask "Pushing changes to upstream git" 44rod git push origin master:master 45git push origin $tag 46