mirror of
https://github.com/diced/zipline.git
synced 2025-05-10 18:05:54 +02:00
fix: import issue
Some checks failed
Build / build (amd64, 20.x) (push) Has been cancelled
Build / build (amd64, 22.x) (push) Has been cancelled
Build / build (amd64, 23.x) (push) Has been cancelled
Build / build (arm64, 20.x) (push) Has been cancelled
Build / build (arm64, 22.x) (push) Has been cancelled
Build / build (arm64, 23.x) (push) Has been cancelled
Push Docker Images / push (push) Has been cancelled
Push Docker Images / amend-builds (push) Has been cancelled
Some checks failed
Build / build (amd64, 20.x) (push) Has been cancelled
Build / build (amd64, 22.x) (push) Has been cancelled
Build / build (amd64, 23.x) (push) Has been cancelled
Build / build (arm64, 20.x) (push) Has been cancelled
Build / build (arm64, 22.x) (push) Has been cancelled
Build / build (arm64, 23.x) (push) Has been cancelled
Push Docker Images / push (push) Has been cancelled
Push Docker Images / amend-builds (push) Has been cancelled
This commit is contained in:
parent
5ab36a08b2
commit
594dfa6ef9
1 changed files with 1 additions and 1 deletions
|
@ -1,13 +1,13 @@
|
|||
// TODO: implement version checking against the API at https://zipline.diced.sh
|
||||
|
||||
import { version } from '../../package.json';
|
||||
import { execSync } from 'child_process';
|
||||
|
||||
export function gitSha() {
|
||||
const envValue = process.env.ZIPLINE_GIT_SHA;
|
||||
if (envValue && envValue !== 'unknown') return envValue;
|
||||
|
||||
try {
|
||||
const { execSync } = require('child_process');
|
||||
const commitHash = execSync('git rev-parse --short HEAD').toString().trim();
|
||||
return commitHash;
|
||||
} catch (error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue