Last active
April 15, 2020 04:21
-
-
Save LuisAlejandro/be348448970a84673c5f1b33032e5fee to your computer and use it in GitHub Desktop.
This is a script to release a new debian package using gitbuildpackage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a script to release a new debian package using gitbuildpackage | |
# Replace <author name> and <author email> with the author data, <gnupg key> with your signing gpg key and <version> with the new version of the package, including the debian revision (ex. 2.0.1-1) | |
export DEBFULLNAME="<author name>" | |
export DEBEMAIL="<author email>" | |
git config --global user.name "<author name>" | |
git config --global user.email "<author email>" | |
git add --all . | |
git commit -a | |
export PKGNAME=$(dpkg-parsechangelog | grep-dctrl -esSource . | awk -F' ' '{print $2}') | |
export VERSION=<version> | |
export ORIGVER=$( echo $VERSION | sed 's/-.*//g' ) | |
gbp dch --new-version="$VERSION" --release --auto --id-length=7 --full --commit --git-author | |
tar --anchored --exclude-vcs --exclude "./debian" --exclude "./.sublime" -cvzf ../$( echo $PKGNAME"_"$ORIGVER ).orig.tar.gz --directory=$(pwd) ./ | |
gbp buildpackage -k<gnupg key> -tc --git-tag --git-retag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment