mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 08:18:03 +02:00
makerepo: detect upstream branch parent for VPN plugins
This commit is contained in:
parent
4cd539745b
commit
e375d9e474
1 changed files with 11 additions and 8 deletions
|
|
@ -399,22 +399,25 @@ pushd "$DIRNAME"
|
||||||
if [[ "x$RELEASE_BASE_COMMIT" == x ]]; then
|
if [[ "x$RELEASE_BASE_COMMIT" == x ]]; then
|
||||||
# if RELEASE_BASE_COMMIT is not set, try detecting the BASE_COMMIT...
|
# if RELEASE_BASE_COMMIT is not set, try detecting the BASE_COMMIT...
|
||||||
|
|
||||||
if [[ "$BUILD_TYPE" == "NetworkManager" ]]; then
|
if [[ "$BUILD_TYPE" == "NetworkManager" ||
|
||||||
# try to find the commit from which the original tarball originates
|
"$BUILD_TYPE" == "NetworkManager-libreswan" ||
|
||||||
# and base the new branch on to of it.
|
"$BUILD_TYPE" == "NetworkManager-pptp" ||
|
||||||
|
"$BUILD_TYPE" == "NetworkManager-openconnect" ||
|
||||||
|
"$BUILD_TYPE" == "NetworkManager-vpnc" ]]; then
|
||||||
RELEASE_BASE_COMMIT="$(sed -n 's/^NM_GIT_SHA=\(.*\)/\1/p' configure 2>/dev/null)"
|
RELEASE_BASE_COMMIT="$(sed -n 's/^NM_GIT_SHA=\(.*\)/\1/p' configure 2>/dev/null)"
|
||||||
elif [[ "$BUILD_TYPE" == "libnl3" ]]; then
|
elif [[ "$BUILD_TYPE" == "libnl3" ]]; then
|
||||||
# try to find the commit from which the original tarball originates
|
|
||||||
# and base the new branch on to of it.
|
|
||||||
RELEASE_BASE_COMMIT="$(sed -n 's/^LIBNL_GIT_SHA=\(.*\)/\1/p' configure 2>/dev/null)"
|
RELEASE_BASE_COMMIT="$(sed -n 's/^LIBNL_GIT_SHA=\(.*\)/\1/p' configure 2>/dev/null)"
|
||||||
elif [[ "$BUILD_TYPE" == "network-manager-applet" ]]; then
|
elif [[ "$BUILD_TYPE" == "network-manager-applet" ]]; then
|
||||||
RELEASE_BASE_COMMIT="$(sed -n 's/^NMA_GIT_SHA=\(.*\)/\1/p' configure 2>/dev/null)"
|
RELEASE_BASE_COMMIT="$(sed -n 's/^NMA_GIT_SHA=\(.*\)/\1/p' configure 2>/dev/null)"
|
||||||
elif [[ "$BUILD_TYPE" == "iproute" ]]; then
|
elif [[ "$BUILD_TYPE" == "iproute" ]]; then
|
||||||
RELEASE_BASE_COMMIT="$(git rev-parse --verify -q "$(sed 's/.*\<iproute2-\([0-9]\+\.[0-9]\+\.[0-9]\+\)\..*/v\1/' ../sources)^{commit}" 2>/dev/null)"
|
RELEASE_BASE_COMMIT="$(git rev-parse --verify -q "$(sed 's/.*\<iproute2-\([0-9]\+\.[0-9]\+\.[0-9]\+\)\..*/v\1/' ../sources)^{commit}" 2>/dev/null)"
|
||||||
elif [[ "$BUILD_TYPE" == "NetworkManager-openvpn" ]]; then
|
elif [[ "$BUILD_TYPE" == "NetworkManager-openvpn" ]]; then
|
||||||
DATE="$(sed -n 's/%global snapshot .git\(20[0-3][0-9]\)\([0-1][0-9]\)\([0-3][0-9]\)/\1-\2-\3/p' "../$SPEC")"
|
RELEASE_BASE_COMMIT="$(sed -n 's/^NM_GIT_SHA=\(.*\)/\1/p' configure 2>/dev/null)"
|
||||||
if [[ "x$DATE" != x ]]; then
|
if [[ "x$RELEASE_BASE_COMMIT" == x ]]; then
|
||||||
RELEASE_BASE_COMMIT="$(git rev-list -n1 --date-order --before="$DATE" origin/master 2>/dev/null)"
|
DATE="$(sed -n 's/%global snapshot .git\(20[0-3][0-9]\)\([0-1][0-9]\)\([0-3][0-9]\)/\1-\2-\3/p' "../$SPEC")"
|
||||||
|
if [[ "x$DATE" != x ]]; then
|
||||||
|
RELEASE_BASE_COMMIT="$(git rev-list -n1 --date-order --before="$DATE" origin/master 2>/dev/null)"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ "x$RELEASE_BASE_COMMIT" == x ]]; then
|
if [[ "x$RELEASE_BASE_COMMIT" == x ]]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue