version-info: return git branch info correctly in cf workers
This commit is contained in:
@@ -39,6 +39,10 @@ export const getBranch = async () => {
|
||||
return process.env.CF_PAGES_BRANCH;
|
||||
}
|
||||
|
||||
if (process.env.WORKERS_CI_BRANCH) {
|
||||
return process.env.WORKERS_CI_BRANCH;
|
||||
}
|
||||
|
||||
return (await readGit('.git/HEAD'))
|
||||
?.replace(/^ref: refs\/heads\//, '')
|
||||
?.trim();
|
||||
|
||||
Reference in New Issue
Block a user