Commit 2cc6a946 authored by Fabian Müller's avatar Fabian Müller
Browse files

Back up changes before build and restore afterwards

parent f5e61349
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -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