github.com/freiheit-com/kuberpult@v1.24.2-0.20240328135542-315d5630abe6/infrastructure/scripts/execution-plan/plan-pr.sh (about)

     1  #!/bin/bash
     2  set -ueo pipefail
     3  script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
     4  source "${script_dir}"/container.inc.sh
     5  
     6  main_branch="main"
     7  current_branch="$(git rev-parse --abbrev-ref HEAD)"
     8  # When called locally with Makefile, the default parameters are used
     9  base="${1:-$(git merge-base "${main_branch}" "${current_branch}")}"
    10  head="${2:-$(git rev-parse HEAD)}"
    11  
    12  git diff --diff-filter=ACMRDT --name-only "$base" "$head" | docker run -i -v "$(pwd)":/repo "${BUILDER_IMAGE}" pr