Skip to content
Snippets Groups Projects
Commit 32f9d8bc authored by Duncan McNamara's avatar Duncan McNamara Committed by Nicolas Pomepuy
Browse files

Compile: add reset option

Resets the submodules medialibrary and vlc to the tested hash
parent 2c2b7ab5
No related branches found
No related tags found
1 merge request!1072Compile: add reset option
Pipeline #133579 passed with stage
in 18 minutes and 53 seconds
......@@ -103,6 +103,13 @@ if [ ! -d "${MEDIALIBRARY_MODULE_DIR}/medialibrary" ]; then
# TODO: remove when switching to VLC 4.0
cd libvlcpp
git am ${SRC_DIR}/buildsystem/patches/libvlcpp/*
elif [ $RESET -eq 1 ]; then
cd ${SRC_DIR}/medialibrary/medialibrary
git reset --hard ${MEDIALIBRARY_HASH}
git submodule update --init libvlcpp
# TODO: remove when switching to VLC 4.0
cd libvlcpp
git am ${SRC_DIR}/buildsystem/patches/libvlcpp/*
else
cd ${MEDIALIBRARY_MODULE_DIR}/medialibrary
if ! git cat-file -e ${MEDIALIBRARY_HASH}; then
......
......@@ -102,6 +102,9 @@ while [ $# -gt 0 ]; do
stub)
STUB=1
;;
--reset)
RESET=1
;;
--no-ml)
NO_ML=1
;;
......@@ -297,6 +300,14 @@ else
fi
if [ "$BYPASS_VLC_SRC_CHECKS" = 1 ]; then
diagnostic "VLC sources: Bypassing checks (required by option)"
elif [ $RESET -eq 1 ]; then
cd vlc
git reset --hard ${TESTED_HASH} || fail "VLC sources: TESTED_HASH ${TESTED_HASH} not found"
for patch_file in ../libvlc/patches/vlc3/*.patch; do
git am --message-id $patch_file
check_patch_is_applied "$patch_file"
done
cd ..
else
diagnostic "VLC sources: Checking TESTED_HASH and patches presence"
diagnostic "NOTE: checks can be bypass by adding '-b' option to this script."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment