mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-29 09:58:27 +00:00
version-info: return git branch info correctly in cf workers
This commit is contained in:
parent
bd0caac5ba
commit
a751f81ea3
@ -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();
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@imput/version-info",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "helper package for cobalt that provides commit info & version from package file.",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
|
Loading…
Reference in New Issue
Block a user