Browse Source

Compile: add reset option

Resets the submodules medialibrary and vlc to the tested hash
pipelines/135724
Duncan McNamara 5 years ago
committed by Nicolas Pomepuy
parent
commit
32f9d8bc13
  1. 7
      buildsystem/compile-medialibrary.sh
  2. 11
      buildsystem/compile.sh

7
buildsystem/compile-medialibrary.sh

@ -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

11
buildsystem/compile.sh

@ -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."

Loading…
Cancel
Save