Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- set -eu
- series=$1
- source=$(dpkg-parsechangelog -SSource)
- version=$(dpkg-parsechangelog -SVersion)
- branch=$(git rev-parse --abbrev-ref HEAD)
- if [ $(echo $branch | cut -d- -f1) != "merge" ]; then
- echo "wrong branch"
- exit 1
- fi
- VER=$(echo $branch | cut -d- -f2)
- MAJOR=$(echo $VER | cut -d. -f1)
- MINOR=$(echo $VER | cut -d. -f2)
- OMINOR=$((MINOR-1))
- P="$(echo -e '\033[01;32mnext command:\033[00m ')"
- e () {
- q="$(printf " %q" "$@")"
- echo
- read -er -a n -i "${q# }" -p "$P"
- echo
- eval "${n[@]}"
- }
- e git checkout -b $series-$MAJOR.$MINOR merge-$MAJOR.$MINOR
- echo
- for h in $(git rev-list --reverse merge-$MAJOR.$OMINOR..$series-$MAJOR.$OMINOR); do
- commit=$(git log -1 --pretty=format:%s $h)
- case "$commit" in
- releasing*|reconstruct*)
- break;;
- esac
- git cherry-pick --allow-empty $h || bash
- if git diff-tree --no-commit-id --name-only -r HEAD | grep -q ^debian/patches; then
- while ! quilt push -a; do
- bash
- done
- quilt refresh
- quilt pop -a
- if ! git diff --exit-code > /dev/null; then
- git commit --amend --no-edit --all
- fi
- fi
- done
- git log --oneline merge-$MAJOR.$MINOR..HEAD
- e dch -b -v $version~$(ubuntu-distro-info --series=$series --release | awk '{ print $1 }').1 '' --release-heuristic log -D UNRELEASED
- e git reconstruct-changelog merge-$MAJOR.$MINOR
- git diff
- e git commit -am reconstruct-changelog
- e rustbuild.sh --test
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement