Skip to content

Commit e7bf4f2

Browse files
committed
ci: make sure to always compare with the latest commit on the main V repo's master branch, when running .github/workflows/compare_pr_to_master.v
1 parent f604b38 commit e7bf4f2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎.github/workflows/compare_pr_to_master.v‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@ fn main() {
9494
}
9595
r('rm -rf vnew1 vnew2')
9696

97-
r('git checkout master')
97+
// make sure to always compare against the main V repo's master branch:
98+
os.execute('git -C . remote add V_REPO https://github.com/vlang/v.git')
99+
os.execute('git -C . fetch V_REPO')
100+
os.execute('git branch -D v_repo_master')
101+
os.execute('git branch -f --track v_repo_master V_REPO/master')
102+
r('git checkout v_repo_master')
98103
master_branch := gbranch()
99104
hline(' Compiling old V executables from branch: ${master_branch}, commit: ${gcommit()} ...')
100105
xtime('./v -o vold1 cmd/v')

0 commit comments

Comments
 (0)