7 | 7 |
git diff --quiet -- "$PKGDIR_REL" || \
|
8 | 8 |
abort 1 "Please git-add your changes to $PKGDIR_REL before running"
|
9 | 9 |
|
10 | |
head -n1 "$PKGDIR/debian/changelog" | grep -q UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO || \
|
11 | |
abort 1 "Package already released. If that was a mistake and you didn't actually upload yet, you may rewind your git and re-run this script."
|
|
10 |
RELBRANCH="pending-$PKGNAME"
|
|
11 |
git fetch origin --prune
|
|
12 |
case "$(git rev-parse --abbrev-ref HEAD)" in
|
|
13 |
pending-$PKGNAME) true;;
|
|
14 |
pending-*) abort 1 "You are on a pending-release branch for a package other than $PKGNAME, $0 can only be run on another branch, like master";;
|
|
15 |
*) if git rev-parse -q --verify "refs/heads/$RELBRANCH" >/dev/null || \
|
|
16 |
git rev-parse -q --verify "refs/remotes/origin/$RELBRANCH" >/dev/null; then
|
|
17 |
git checkout "$RELBRANCH"
|
|
18 |
else
|
|
19 |
git checkout -b "$RELBRANCH"
|
|
20 |
fi;;
|
|
21 |
esac
|
|
22 |
|
|
23 |
if head -n1 "$PKGDIR/debian/changelog" | grep -qv UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; then
|
|
24 |
abort 0 "Package already released. If that was a mistake then checkout another branch, delete this one ($RELBRANCH), and re-run this script ($*)"
|
|
25 |
fi
|
12 | 26 |
|
13 | 27 |
( cd "$PKGDIR"
|
14 | 28 |
sed -i -e s/UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO/UNRELEASED/ debian/changelog
|
|
30 | 44 |
DEBSRC=$(dpkg-parsechangelog -l build/$PKGNAME/debian/changelog -SSource)
|
31 | 45 |
DEB_HOST_ARCH=$(dpkg-architecture -q DEB_HOST_ARCH)
|
32 | 46 |
cat >&2 <<eof
|
33 | |
Release of $CRATE ready as a source package in ${BUILDDIR#$PWD/}.
|
|
47 |
Release of $CRATE ready as a source package in ${BUILDDIR#$PWD/}. You need to
|
|
48 |
perform the following steps:
|
|
49 |
|
|
50 |
Build the package if necessary, and upload
|
|
51 |
==========================================
|
34 | 52 |
|
35 | 53 |
If the source package is already in Debian and this version does not introduce
|
36 | 54 |
new binaries, then you can just go ahead and directly dput the source package.
|
|
55 |
|
|
56 |
$ dput ${DEBSRC}_${DEBVER}_source.changes
|
37 | 57 |
|
38 | 58 |
If this is a NEW source package or introduces NEW binary packages not already
|
39 | 59 |
in the Debian archive, you will need to build a binary package out of it. The
|
|
48 | 68 |
See https://wiki.debian.org/sbuild for instructions on how to set it up. The
|
49 | 69 |
other tools are from the 'devscripts' package.
|
50 | 70 |
|
51 | |
The above assumes you are a Debian Developer. If not, you should revert your
|
52 | |
changes with \`git reset --hard @~\` and ask a Debian Developer to do this step.
|
|
71 |
Push this pending-release branch
|
|
72 |
================================
|
|
73 |
|
|
74 |
After you have uploaded the package with dput(1), you should push $RELBRANCH so
|
|
75 |
that other people see it's been uploaded. Then, checkout another branch like
|
|
76 |
master to continue development on other packages.
|
|
77 |
|
|
78 |
$ git push origin $RELBRANCH
|
|
79 |
$ git checkout master
|
|
80 |
|
|
81 |
Merge the pending-release branch when ACCEPTED
|
|
82 |
==============================================
|
|
83 |
|
|
84 |
When it's ACCEPTED by the Debian FTP masters, you may then merge this branch
|
|
85 |
back into the master branch, delete it, and push these updates to origin.
|
|
86 |
|
|
87 |
$ git checkout master
|
|
88 |
$ git merge $RELBRANCH
|
|
89 |
$ git branch -d $RELBRANCH
|
|
90 |
$ git push origin master :$RELBRANCH
|
|
91 |
|
|
92 |
----
|
|
93 |
|
|
94 |
The above assumes you are a Debian Developer with upload rights. If not, you
|
|
95 |
should revert what I just did:
|
|
96 |
|
|
97 |
$ git checkout master
|
|
98 |
$ git branch -D $RELBRANCH
|
|
99 |
|
|
100 |
Then ask a Debian Developer to re-run me ($*) on your behalf.
|
53 | 101 |
eof
|