# 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)"
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,\
*) badusage "invalid quilt mode: $quilt_mode" ;;
esac
-# ---- Gather git information
+# **** Gather git information ****
remoteconfigs=()
to_push=()
fi
fi
-# ---- Gather source package information
+# **** Gather source package information ****
temp=$(mktemp -d)
trap cleanup EXIT
;;
esac
-# ---- Gather git history information
+# **** Gather git history information ****
last_debian_tag=$(find_last_tag "debian/")
last_archive_tag=$(find_last_tag "archive/debian/")
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"^{})
fi
fi
+# ---- Targeting different suite
+
if ! [ "x$last_debian_tag" = "x" ]; then
temp=$(mktemp -d)
trap cleanup EXIT
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
"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')
[dgit please-upload$upstream_info]
EOF
-# ---- Do a git push
+# **** Do a git push ****
if $pushing; then
git push "$remote" "${to_push[@]}"