Skip to content

Commit

Permalink
Added possibility to release on Debian.
Browse files Browse the repository at this point in the history
  • Loading branch information
lueschem committed Sep 14, 2018
1 parent 2554430 commit 37fc764
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions do_release
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ set -o nounset
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${SCRIPTDIR}

if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]
then
>&2 echo "Error: please switch to the master branch before doing a release!"
exit 1
fi

if ! git diff --exit-code --quiet
then
>&2 echo "Error: there are unstaged changes!"
Expand All @@ -36,7 +42,18 @@ git clean -dxf
source /etc/os-release

RAW_VERSION="${1}"
NEW_VERSION="${1}+u$(echo ${VERSION_ID} | sed s#\\.##g)"

if [ "${ID}" == "ubuntu" ]
then
NEW_VERSION="${1}+u$(echo ${VERSION_ID} | sed s#\\.##g)"
elif [ "${ID}" == "debian" ]
then
NEW_VERSION="${1}+deb$(echo ${VERSION_ID} | sed s#\\.##g)"
VERSION_CODENAME=$(echo ${VERSION} | awk -F"[)(]+" '{print $2}')
else
>&2 echo "Error: unhandled operating system id (${ID})!"
exit 1
fi
if [ "${VERSION_ID}" == "18.04" ]
then
Expand Down Expand Up @@ -75,11 +92,13 @@ then
git tag -a v${RAW_VERSION} -m "Tag for setuptools scm."
fi
# verify that the package can be built:
debuild -us -uc
debuild -S
dput ppa:m-luescher/edi-snapshots ../edi_${NEW_VERSION}_source.changes
if [ "${ID}" == "ubuntu" ]
then
debuild -S
dput ppa:m-luescher/edi-snapshots ../edi_${NEW_VERSION}_source.changes
fi
git push origin ${GIT_BRANCH}
git push --tags
Expand Down

0 comments on commit 37fc764

Please sign in to comment.