File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -30,17 +30,21 @@ done && shift $(($OPTIND - 1))
30
30
# we're in llvm.obj dir
31
31
BUILD_DIR=${PWD}
32
32
33
- # Get changed build script files
34
- cd ${SRC_DIR}
35
- git fetch -t origin refs/pull/${PR_NUMBER} /merge
36
- exit_if_err $? " fail to get tags"
37
- git checkout -B refs/pull/${PR_NUMBER} /merge
38
- exit_if_err $? " fail to get tags"
39
- base_commit=` git merge-base origin/sycl refs/pull/${PR_NUMBER} /merge`
40
- exit_if_err $? " fail to get base commit"
33
+ # Get changed build script files if it is PR
34
+ if [ -n " ${PR_NUMBER} " ]; then
35
+ cd ${SRC_DIR}
36
+ git fetch origin sycl
37
+ exit_if_err $? " fail to get the latest changes in sycl branch"
38
+ git fetch -t origin refs/pull/${PR_NUMBER} /merge
39
+ exit_if_err $? " fail to get tags"
40
+ git checkout -B refs/pull/${PR_NUMBER} /merge
41
+ exit_if_err $? " fail to create branch for specific tag"
42
+ base_commit=` git merge-base origin/sycl refs/pull/${PR_NUMBER} /merge`
43
+ exit_if_err $? " fail to get base commit"
41
44
42
- BUILD_SCRIPT=` git --no-pager diff ${base_commit} refs/pull/${PR_NUMBER} /merge --name-only buildbot`
43
- cd -
45
+ BUILD_SCRIPT=` git --no-pager diff ${base_commit} refs/pull/${PR_NUMBER} /merge --name-only buildbot`
46
+ cd -
47
+ fi
44
48
45
49
# # Clean up build directory if build scripts has changed
46
50
cd ${DST_DIR}
You can’t perform that action at this time.
0 commit comments