fix: commit id as version id
This commit is contained in:
parent
83862eae44
commit
2f2e0b6762
@ -8,7 +8,8 @@ import { ACCESS_CODES, IS_IN_DOCKER } from "./api/access";
|
|||||||
let COMMIT_ID: string | undefined;
|
let COMMIT_ID: string | undefined;
|
||||||
try {
|
try {
|
||||||
COMMIT_ID = process
|
COMMIT_ID = process
|
||||||
.execSync("git describe --tags --abbrev=0")
|
// .execSync("git describe --tags --abbrev=0")
|
||||||
|
.execSync("git rev-parse --short HEAD")
|
||||||
.toString()
|
.toString()
|
||||||
.trim();
|
.trim();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -26,8 +26,10 @@ export const useUpdateStore = create<UpdateStore>()(
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const data = await (await fetch(FETCH_TAG_URL)).json();
|
// const data = await (await fetch(FETCH_TAG_URL)).json();
|
||||||
const remoteId = data[0].name as string;
|
// const remoteId = data[0].name as string;
|
||||||
|
const data = await (await fetch(FETCH_COMMIT_URL)).json();
|
||||||
|
const remoteId = (data[0].sha as string).substring(0, 7);
|
||||||
set(() => ({
|
set(() => ({
|
||||||
lastUpdate: Date.now(),
|
lastUpdate: Date.now(),
|
||||||
remoteId,
|
remoteId,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user