[Android] buildsystem: Avoid resetting remote access repo if already on tested hash
Nicolas Pomepuy
git at videolan.org
Tue Nov 3 10:49:50 UTC 2026
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Nov 2 13:42:32 2026 +0100| [0e8739e03a215db2ac3ecac203ce48581c815859] | committer: Nicolas Pomepuy
buildsystem: Avoid resetting remote access repo if already on tested hash
> https://code.videolan.org/videolan/vlc-android/commit/0e8739e03a215db2ac3ecac203ce48581c815859
---
buildsystem/compile-remoteaccess.sh | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/buildsystem/compile-remoteaccess.sh b/buildsystem/compile-remoteaccess.sh
index 91ebd3c998..7f467ccf60 100755
--- a/buildsystem/compile-remoteaccess.sh
+++ b/buildsystem/compile-remoteaccess.sh
@@ -102,10 +102,12 @@ if [ ! -d "$VLC_REMOTE_ACCESS_PATH" ] || [ ! -d "$VLC_REMOTE_ACCESS_PATH/.git" ]
else
diagnostic "Remote access sources: found in $VLC_REMOTE_ACCESS_PATH"
cd "$VLC_REMOTE_ACCESS_PATH"
- git fetch origin ${branch}:refs/remotes/origin/${branch}
- git checkout -B ${branch} origin/${branch}
- if [ "$USE_MAIN" != 1 ]; then
- git reset --hard ${REMOTE_ACCESS_TESTED_HASH} || fail "Remote access sources: REMOTE_ACCESS_TESTED_HASH ${REMOTE_ACCESS_TESTED_HASH} not found"
+ if [ "$USE_MAIN" = 1 ]; then
+ git fetch origin ${branch}:refs/remotes/origin/${branch}
+ git checkout -B ${branch} origin/${branch}
+ elif [ "$(git rev-parse HEAD 2>/dev/null)" != "$REMOTE_ACCESS_TESTED_HASH" ]; then
+ git fetch origin ${branch}:refs/remotes/origin/${branch}
+ git checkout -B ${branch} ${REMOTE_ACCESS_TESTED_HASH} || fail "Remote access sources: REMOTE_ACCESS_TESTED_HASH ${REMOTE_ACCESS_TESTED_HASH} not found"
fi
cd "$CURRENT_DIR"
fi
More information about the Android
mailing list