mirror of
https://github.com/imputnet/cobalt.git
synced 2026-05-13 08:27:03 +00:00
version-info: return git branch info correctly in cf workers
This commit is contained in:
parent
bd0caac5ba
commit
a751f81ea3
2 changed files with 5 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue