Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .buildkite/scripts/backport_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,15 @@ updateBackportBranchContents() {
# Update scripts used by mage
local MAGEFILE_SCRIPTS_FOLDER="dev/citools"
local TESTSREPORTER_SCRIPTS_FOLDER="dev/testsreporter"
local COVERAGE_SCRIPTS_FOLDER="dev/coverage"
if git ls-tree -d --name-only main:${MAGEFILE_SCRIPTS_FOLDER} > /dev/null 2>&1 ; then
echo "Copying $MAGEFILE_SCRIPTS_FOLDER from $SOURCE_BRANCH..."
git checkout "$SOURCE_BRANCH" -- "${MAGEFILE_SCRIPTS_FOLDER}"
echo "Copying $TESTSREPORTER_SCRIPTS_FOLDER from $SOURCE_BRANCH..."
git checkout "$SOURCE_BRANCH" -- "${TESTSREPORTER_SCRIPTS_FOLDER}"
echo "Copying $COVERAGE_SCRIPTS_FOLDER from $SOURCE_BRANCH..."
git checkout "$SOURCE_BRANCH" -- "${COVERAGE_SCRIPTS_FOLDER}"
echo "Copying magefile.go from $SOURCE_BRANCH..."
git checkout "$SOURCE_BRANCH" -- "magefile.go"
# Run go mod tidy to update just the dependencies related to magefile and dev scripts
go mod tidy
Expand Down Expand Up @@ -173,7 +178,8 @@ updateBackportBranchContents() {

if [ "$DRY_RUN" == "true" ];then
echo "DRY_RUN mode, nothing will be pushed."
git --no-pager diff $SOURCE_BRANCH...$BACKPORT_BRANCH_NAME
# Show just the relevant files diff (go.mod, go.sum, .buildkite, dev and package to be backported)
git --no-pager diff $SOURCE_BRANCH...$BACKPORT_BRANCH_NAME go.mod go.sum .buildkite/ dev/ "packages/${PACKAGE_NAME}"
else
echo "Pushing..."
git push origin $BACKPORT_BRANCH_NAME
Expand Down