# Update this package

git fetch upstream
export VERSION=1.3.2
git verify-tag -v v${VERSION}

git checkout debian/sid
uscan --download

gbp import-orig --upstream-vcs-tag=v${VERSION} --pristine-tar "../onionshare_${VERSION}.orig.tar.gz"

# Now update the changelog
dch -i
git commit debian/changelog

# Clean previous build
git clean -fdx

# build
gbp buildpackage
git tag -s debian/$VERSION-1
git push origin master && git push origin pristine-tar && git-push debian/sid && git push origin --tags
____________________________________________

# Old, non-preferred way of updating this package.
uscan --download
export NEW_UPSTREAM_VERSION=1.3
export PKG_NAME=onionshare
export PACKAGING_BRANCH=debian
git checkout "$PACKAGING_BRANCH"
export UPSTREAM_BRANCH=`gbp config buildpackage.upstream-branch | sed -r -e 's,.*=,,'`

# Import
git merge $NEW_UPSTREAM_VERSION
gbp import-orig \
  --upstream-vcs-tag="v$NEW_UPSTREAM_VERSION" \
  ../${PKG_NAME}_${NEW_UPSTREAM_VERSION}.orig.tar.gz

gbp dch && dch -e
git commit debian/changelog -m "$(head -n 1 debian/changelog | sed -e 's,).*,),')
gbp buildpackage

gbp buildpackage --git-tag-only --git-sign-tags && \
git push --tags origin "$UPSTREAM_BRANCH" \
  "$PACKAGING_BRANCH" \
  pristine-tar
____________________________________________

