release: fix release script for relative paths

This commit is contained in:
Thomas Haller 2021-06-30 16:27:01 +02:00
parent 8c4e8d5beb
commit e06261471c
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -192,6 +192,8 @@ DIR="$(git rev-parse --show-toplevel)"
ORIGIN=origin
BASH_SOURCE_ABSOLUTE="$(readlink -f "$BASH_SOURCE")"
test -d "$DIR" &&
cd "$DIR" &&
test -f ./contrib/fedora/rpm/build_clean.sh || die "cannot find NetworkManager base directory"
@ -354,7 +356,7 @@ if [ -n "$RELEASE_BRANCH" ]; then
fi
if [ "$ALLOW_LOCAL_BRANCHES" != 1 ]; then
cmp <(git show origin/main:contrib/fedora/rpm/release.sh) "$BASH_SOURCE" || die "$BASH_SOURCE is not identical to \`git show origin/main:contrib/fedora/rpm/release.sh\`"
cmp <(git show origin/main:contrib/fedora/rpm/release.sh) "$BASH_SOURCE_ABSOLUTE" || die "$BASH_SOURCE is not identical to \`git show origin/main:contrib/fedora/rpm/release.sh\`"
fi
if ! check_news "$RELEASE_MODE" "@{VERSION_ARR[@]}" ; then