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

This commit is contained in:
Delyan Angelov 2025-08-01 16:02:14 +03:00
parent f604b38cf8
commit e7bf4f2475
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -94,7 +94,12 @@ fn main() {
} }
r('rm -rf vnew1 vnew2') r('rm -rf vnew1 vnew2')
r('git checkout master') // make sure to always compare against the main V repo's master branch:
os.execute('git -C . remote add V_REPO https://github.com/vlang/v.git')
os.execute('git -C . fetch V_REPO')
os.execute('git branch -D v_repo_master')
os.execute('git branch -f --track v_repo_master V_REPO/master')
r('git checkout v_repo_master')
master_branch := gbranch() master_branch := gbranch()
hline(' Compiling old V executables from branch: ${master_branch}, commit: ${gcommit()} ...') hline(' Compiling old V executables from branch: ${master_branch}, commit: ${gcommit()} ...')
xtime('./v -o vold1 cmd/v') xtime('./v -o vold1 cmd/v')