Skip to content

Commit cedbbc8

Browse files
committed
update release script
- fix paths for src/ - check for dirty git - remove mercurial support
1 parent 82f5932 commit cedbbc8

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

release.sh

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,19 @@ else
99
TESTREL=0
1010
fi
1111

12-
VERSION=$(echo '#include "default_options.h"\n#include "sysoptions.h"\necho DROPBEAR_VERSION' | cpp -DHAVE_CRYPT - | sh)
12+
VERSION=$(echo '#include "src/default_options.h"\n#include "src/sysoptions.h"\necho DROPBEAR_VERSION' | cpp -DHAVE_CRYPT - | sh)
1313

1414
if [ $TESTREL -eq 1 ]; then
1515
echo Making test tarball for "$VERSION" ...
1616
echo Not checking version mismatches.
1717
WORKDIR=$(mktemp -d)
1818
TARSUFFIX="-testrel"
1919
else
20+
if ! git diff -s --exit-code; then
21+
echo "Git isn't clean"
22+
exit 1
23+
fi
24+
2025
echo Releasing version "$VERSION" ...
2126
if ! head -n1 CHANGES | grep -q $VERSION ; then
2227
echo "CHANGES needs updating"
@@ -52,16 +57,7 @@ if test -e $ARCHIVE; then
5257
exit 1
5358
fi
5459

55-
if [ -d .hg ]; then
56-
hg archive "$RELDIR" || exit 2
57-
# .hg_archival.txt seems to differ between hg versions, isn't good for reproducibility
58-
rm "$RELDIR/.hg_archival.txt"
59-
elif [ -d .git ]; then
60-
git -c tar.umask=0022 archive --format tar -o /dev/stdout --prefix=dropbear-$VERSION/ HEAD | tar xf - -C $WORKDIR || exit 2
61-
else
62-
echo "This isn't a hg or git checkout"
63-
exit 1
64-
fi
60+
git -c tar.umask=0022 archive --format tar -o /dev/stdout --prefix=dropbear-$VERSION/ HEAD | tar xf - -C $WORKDIR || exit 2
6561

6662
chmod -R a+rX $RELDIR
6763

0 commit comments

Comments
 (0)