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

This commit is contained in:
diced 2025-05-06 01:19:08 -07:00
parent 5ab36a08b2
commit 594dfa6ef9
No known key found for this signature in database
GPG key ID: 436B2B0FA0DCA354

View file

@ -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) {