summaryrefslogtreecommitdiff
path: root/.buildkite
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2021-08-24 13:16:31 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2021-08-24 13:16:31 -0700
commitffeaa9c5c2b41e5f8440d3760f8eb96375648ee2 (patch)
tree801f402b83d8b02fe9172de69c02fc1070e513ce /.buildkite
parentf75f7d1036abde8eba236cb6a72fb65e7ba582a1 (diff)
downloadchef-ffeaa9c5c2b41e5f8440d3760f8eb96375648ee2.tar.gz
more synching to main
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to '.buildkite')
-rw-r--r--.buildkite/hooks/pre-command24
1 files changed, 12 insertions, 12 deletions
diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command
index 6f9dcecdf6..9af5d459b5 100644
--- a/.buildkite/hooks/pre-command
+++ b/.buildkite/hooks/pre-command
@@ -8,31 +8,31 @@ set -eu
docker ps || true
free -m || true
-# We've now seen cases where origin/master on the build hosts can get
+# We've now seen cases where origin/main on the build hosts can get
# out of date. This causes us to build components unnecessarily.
# Fetching it here hopefully will prevent this situation.
-echo "Fetching origin/master"
-git fetch origin master
+echo "Fetching origin/main"
+git fetch origin main
# DEBUGGING FOR RELENG
# Fetch the git tags to see if that addresses the weird smart build behavior for Habitat
git fetch --tags --force
-# Rebase onto current master to ensure this PR is closer to what happens when it's merged.
+# Rebase onto current main to ensure this PR is closer to what happens when it's merged.
# Only do this if it's actually a branch (i.e. a PR or a manually created build), not a
-# post-merge CI run of master.
-if [[ "$BUILDKITE_BRANCH" != "master" ]]; then
+# post-merge CI run of main.
+if [[ "$BUILDKITE_BRANCH" != "main" ]]; then
git config user.email "you@example.com" # these are needed for the rebase attempt
git config user.name "Your Name"
- master=$(git show-ref -s --abbrev origin/master)
+ main=$(git show-ref -s --abbrev origin/main)
pr_head=$(git show-ref -s --abbrev HEAD)
github="https://github.com/chef/chef/commit/"
- if git rebase origin/master >/dev/null; then
- buildkite-agent annotate --style success --context "rebase-pr-branch-${master}" \
- "Rebased onto master ([${master}](${github}${master}))."
+ if git rebase origin/main >/dev/null; then
+ buildkite-agent annotate --style success --context "rebase-pr-branch-${main}" \
+ "Rebased onto main ([${main}](${github}${main}))."
else
git rebase --abort
- buildkite-agent annotate --style warning --context "rebase-pr-branch-${master}" \
- "Couldn't rebase onto master ([${master}](${github}${master})), building PR HEAD ([${pr_head}](${github}${pr_head}))."
+ buildkite-agent annotate --style warning --context "rebase-pr-branch-${main}" \
+ "Couldn't rebase onto main ([${main}](${github}${main})), building PR HEAD ([${pr_head}](${github}${pr_head}))."
fi
fi