Skip to content

Commit 709eb30

Browse files
committed
Update main branch name
1 parent 8ea3576 commit 709eb30

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vars/getSources.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ def call(Map config) {
88
checkout scm
99
// Generate "git_diff.txt "and optionally "release.txt" for later stages.
1010
sh """
11-
if [ "${env.GIT_BRANCH}" == master ] ; then
12-
# on master, we simply compare to the last commit
11+
if [ "${env.GIT_BRANCH}" == main ] ; then
12+
# on main, we simply compare to the last commit
1313
git diff -U0 --no-color HEAD^ > git_diff.txt
1414
else
1515
# in branches, we diff to the merge-base, because Jenkins might not see each commit individually
16-
git fetch --no-tags ${env.GIT_URL} +refs/heads/master:refs/remotes/origin/master
17-
git diff -U0 --no-color \$(git merge-base origin/master HEAD) > git_diff.txt
16+
git fetch --no-tags ${env.GIT_URL} +refs/heads/main:refs/remotes/origin/main
17+
git diff -U0 --no-color \$(git merge-base origin/main HEAD) > git_diff.txt
1818
fi
1919
if [ -f scripts/get-release-version.sh ] ; then
2020
sh scripts/get-release-version.sh

0 commit comments

Comments
 (0)