Path: blob/master/utils/xorg-deps/xf86-input-neko/release.sh
1007 views
#!/bin/bash1: 'Copyright (C) 2017, Martin Kepplinger <[email protected]>23Permission is hereby granted, free of charge, to any person obtaining a4copy of this software and associated documentation files (the "Software"),5to deal in the Software without restriction, including without limitation6the rights to use, copy, modify, merge, publish, distribute, sublicense,7and/or sell copies of the Software, and to permit persons to whom the Software8is furnished to do so, subject to the following conditions:910The above copyright notice and this permission notice shall be included in all11copies or substantial portions of the Software.1213THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR14IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE16AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER17LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,18OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN19THE SOFTWARE.'2021# Script to build release-archives with. This requires a checkout from git.22# Before running it, change the version in configure.ac. Only do this. Do23# *not* commit this change. This script will do it.2425# WARNING: This script is very dangerous! It may delete any untracked files.2627have_version=02829usage()30{31echo "Usage: $0 -v version"32}3334args=$(getopt -o v:s -- "$@")35if [ $? -ne 0 ] ; then36usage37exit 138fi39eval set -- "$args"40while [ $# -gt 0 ]41do42case "$1" in43-v)44version=$245have_version=146shift47;;48--)49shift50break51;;52*)53echo "Invalid option: $1"54usage55exit 156;;57esac58shift59done6061# Do we have a desired version number?62if [ "$have_version" -gt 0 ] ; then63echo "trying to build version $version"64else65echo "please specify a version"66usage67exit 168fi6970# Version number sanity check71if grep ${version} configure.ac72then73echo "configurations seems ok"74else75echo "please check your configure.ac"76exit 177fi7879# Check that we are on master80branch=$(git rev-parse --abbrev-ref HEAD)81echo "we are on branch $branch"8283if [ ! "${branch}" = "master" ] ; then84echo "you don't seem to be on the master branch"85exit 186fi8788if git diff-index --quiet HEAD --; then89# no changes90echo "there are no uncommitted changes (version bump)"91exit 192fi93echo "======================================================"94echo " are you fine with the following version bump?"95echo "======================================================"96git diff97echo "======================================================"98read -p " Press enter to continue"99echo "======================================================"100101./autogen.sh && ./configure && make distcheck102./autogen-clean.sh103git clean -d -f104105git commit -a -m "xf86-input-neko ${version}"106git tag -s ${version} -m "xf86-input-neko ${version}"107108./autogen.sh && ./configure && make distcheck109sha256sum xf86-input-neko-${version}.tar.xz > xf86-input-neko-${version}.tar.xz.sha256110sha256sum xf86-input-neko-${version}.tar.gz > xf86-input-neko-${version}.tar.gz.sha256111sha256sum xf86-input-neko-${version}.tar.bz2 > xf86-input-neko-${version}.tar.bz2.sha256112113sha512sum xf86-input-neko-${version}.tar.xz > xf86-input-neko-${version}.tar.xz.sha512114sha512sum xf86-input-neko-${version}.tar.gz > xf86-input-neko-${version}.tar.gz.sha512115sha512sum xf86-input-neko-${version}.tar.bz2 > xf86-input-neko-${version}.tar.bz2.sha512116117gpg -b -a xf86-input-neko-${version}.tar.xz118gpg -b -a xf86-input-neko-${version}.tar.gz119gpg -b -a xf86-input-neko-${version}.tar.bz2120121122123