diff --git a/snippets/basop/build-binaries.sh b/snippets/basop/build-binaries.sh index 1d737db886d79cd00d23e85030e3531004aeafe7..cd179010b0326285c296e682c5f9cb8283cf25dd 100755 --- a/snippets/basop/build-binaries.sh +++ b/snippets/basop/build-binaries.sh @@ -36,7 +36,17 @@ fi current_commit_sha="$(git rev-parse HEAD)" -git restore . +restore_stash() { + if [[ "$(git stash list)" != "" ]]; then + git stash pop + fi +} +trap restore_stash EXIT + +# store potential changes +# should never fail, even if there is nothing to be stored +git stash + git checkout "$branch_to_check_out" bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/activate-debug-mode-info-if-set.sh