From: Sean Whitton Date: Fri, 19 Jul 2019 15:33:01 +0000 (+0100) Subject: git-debpush: Subheaders X-Git-Tag: archive/debian/9.5~32 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=c01951dd94161b9e9c2b602b1e308ee4354c9520;p=dgit.git git-debpush: Subheaders No functional change. Signed-off-by: Sean Whitton --- diff --git a/git-debpush b/git-debpush index 0ddbfc47..e2ea2b64 100755 --- a/git-debpush +++ b/git-debpush @@ -35,7 +35,7 @@ set -o pipefail # mode; if there is a previous tag, and no quilt mode provided, assume # same quilt mode as in previous tag created by this script -# ---- Helper functions and variables +# **** Helper functions and variables **** us="$(basename $0)" @@ -86,7 +86,7 @@ find_last_tag () { set -o pipefail } -# ---- Parse command line +# **** Parse command line **** getopt=$(getopt -s bash -o 'nfu:' \ -l 'no-push,force,branch:,remote:,distro:,upstream:,quilt:,gbp,dpm,\ @@ -137,7 +137,7 @@ case "$quilt_mode" in *) badusage "invalid quilt mode: $quilt_mode" ;; esac -# ---- Gather git information +# **** Gather git information **** remoteconfigs=() to_push=() @@ -186,7 +186,7 @@ if $pushing && [ "x$remote" = "x" ]; then fi fi -# ---- Gather source package information +# **** Gather source package information **** temp=$(mktemp -d) trap cleanup EXIT @@ -216,7 +216,7 @@ case "$format" in ;; esac -# ---- Gather git history information +# **** Gather git history information **** last_debian_tag=$(find_last_tag "debian/") last_archive_tag=$(find_last_tag "archive/debian/") @@ -247,12 +247,16 @@ if $upstream; then to_push+=("$upstream_tag") fi -# ---- Useful sanity checks +# **** Useful sanity checks **** + +# ---- UNRELEASED suite if [ "$target" = "UNRELEASED" ]; then fail_check "UNRELEASED changelog" fi +# ---- Pushing dgit view to maintainer view + if ! [ "x$last_debian_tag" = "x" ] && ! [ "x$last_archive_tag" = "x" ]; then last_debian_tag_c=$(git rev-parse "$last_debian_tag"^{}) last_archive_tag_c=$(git rev-parse "$last_archive_tag"^{}) @@ -264,6 +268,8 @@ if ! [ "x$last_debian_tag" = "x" ] && ! [ "x$last_archive_tag" = "x" ]; then fi fi +# ---- Targeting different suite + if ! [ "x$last_debian_tag" = "x" ]; then temp=$(mktemp -d) trap cleanup EXIT @@ -279,6 +285,8 @@ if ! [ "x$last_debian_tag" = "x" ]; then fi fi +# ---- Upstream tag is not ancestor of $branch + if ! [ "x$upstream_tag" = "x" ] \ && ! git merge-base --is-ancestor "$upstream_tag" "$branch" \ && ! [ "$quilt_mode" = "baredebian" ]; then @@ -286,12 +294,13 @@ if ! [ "x$upstream_tag" = "x" ] \ "upstream tag $upstream_tag is not an ancestor of $branch; probably a mistake" fi +# ---- Summary if ! $force && $failed_check; then fail "some checks failed; you can override with --force" fi -# ---- Create the git tag +# **** Create the git tag **** # convert according to DEP-14 rules git_version=$(echo $version | tr ':~' '%_' | sed 's/\.(?=\.|$|lock$)/.#/g') @@ -330,7 +339,7 @@ $source release $version for $target [dgit please-upload$upstream_info] EOF -# ---- Do a git push +# **** Do a git push **** if $pushing; then git push "$remote" "${to_push[@]}"