summaryrefslogtreecommitdiff
path: root/git-debpush
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2019-07-19 16:33:01 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2019-07-20 17:05:27 +0100
commitc01951dd94161b9e9c2b602b1e308ee4354c9520 (patch)
treebee7dd2dad0af8e9b1b916cc76ef73456d80ee9b /git-debpush
parent7b8f85234fd969b470f67da1ee0d3d79f119cfaf (diff)
git-debpush: Subheaders
No functional change. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'git-debpush')
-rwxr-xr-xgit-debpush25
1 files changed, 17 insertions, 8 deletions
diff --git a/git-debpush b/git-debpush
index 0ddbfc4..e2ea2b6 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[@]}"