From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../webrtc/third_party_build/verify_vendoring.sh | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 dom/media/webrtc/third_party_build/verify_vendoring.sh (limited to 'dom/media/webrtc/third_party_build/verify_vendoring.sh') diff --git a/dom/media/webrtc/third_party_build/verify_vendoring.sh b/dom/media/webrtc/third_party_build/verify_vendoring.sh new file mode 100644 index 0000000000..3d2c161075 --- /dev/null +++ b/dom/media/webrtc/third_party_build/verify_vendoring.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +function show_error_msg() +{ + echo "*** ERROR *** $? line $1 $0 did not complete successfully!" + echo "$ERROR_HELP" +} +ERROR_HELP="" + +# Print an Error message if `set -eE` causes the script to exit due to a failed command +trap 'show_error_msg $LINENO' ERR + +source dom/media/webrtc/third_party_build/use_config_env.sh + +echo "MOZ_LIBWEBRTC_SRC: $MOZ_LIBWEBRTC_SRC" +echo "MOZ_LIBWEBRTC_BRANCH: $MOZ_LIBWEBRTC_BRANCH" +echo "MOZ_FASTFORWARD_BUG: $MOZ_FASTFORWARD_BUG" + +# After this point: +# * eE: All commands should succeed. +# * u: All variables should be defined before use. +# * o pipefail: All stages of all pipes should succeed. +set -eEuo pipefail + +./mach python $SCRIPT_DIR/vendor-libwebrtc.py \ + --from-local $MOZ_LIBWEBRTC_SRC \ + --commit $MOZ_LIBWEBRTC_BRANCH \ + libwebrtc + +hg revert -q \ + --include "third_party/libwebrtc/**moz.build" \ + --include "third_party/libwebrtc/README.mozilla" \ + third_party/libwebrtc + +FILE_CHANGE_CNT=`hg status third_party/libwebrtc | wc -l | tr -d " "` +if [ "x$FILE_CHANGE_CNT" != "x0" ]; then + echo "***" + echo "There are changes after vendoring - running extract-for-git.py" + echo "is recommended. First, find the mercurial commit after the" + echo "previous fast-forward landing. The commands you want will look" + echo "something like:" + echo " ./mach python $SCRIPT_DIR/extract-for-git.py {after-ff-commit}::{tip-of-central}" + echo " mv mailbox.patch $MOZ_LIBWEBRTC_SRC" + echo " (cd $MOZ_LIBWEBRTC_SRC && \\" + echo " git am mailbox.patch)" + echo "" + echo "After adding the new changes from moz-central to the moz-libwebrtc" + echo "patch stack, you may re-run this command to verify vendoring:" + echo " bash $0" + + exit 1 +fi + + +echo "Done - vendoring has been verified." -- cgit v1.2.3