Skip to content

Commit eb8a6d8

Browse files
authored
Merge pull request #333 from NillionNetwork/chore/release-2.0.0
2 parents 741ab91 + 89905c3 commit eb8a6d8

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

justfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ create-buildinfo:
9595
cat << EOF > buildinfo.json
9696
{
9797
"time": "$(date -u +'%Y-%m-%dT%H:%M:%SZ')",
98-
"commit": "$(git rev-parse HEAD)"
98+
"commit": "$(git rev-parse HEAD)",
99+
"version": "0.0.0"
99100
}
100101
EOF
101102

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import fs from "node:fs";
22

3-
type BuildInfo = {
4-
time: string;
5-
commit: string;
6-
};
3+
import { BuildInfo } from "@nildb/system/system.types";
74

85
function loadBuildInfo(): BuildInfo {
96
try {
@@ -14,6 +11,7 @@ function loadBuildInfo(): BuildInfo {
1411
return {
1512
time: "1970-01-01T00:00:00Z",
1613
commit: "unknown",
14+
version: "0.0.0",
1715
};
1816
}
1917
}
@@ -22,3 +20,4 @@ const buildInfo = loadBuildInfo();
2220

2321
export const BUILD_COMMIT = buildInfo.commit;
2422
export const BUILD_TIME = buildInfo.time;
23+
export const BUILD_VERSION = buildInfo.version ?? "0.0.0";

packages/api/src/system/system.services.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BUILD_COMMIT, BUILD_TIME } from "@nildb/common/buildinfo";
1+
import { BUILD_COMMIT, BUILD_TIME, BUILD_VERSION } from "@nildb/common/buildinfo";
22
import type { CollectionNotFoundError, DatabaseError } from "@nildb/common/errors";
33
import type { AppBindings } from "@nildb/env";
44
import { Effect as E, pipe } from "effect";
@@ -40,6 +40,7 @@ function getBuildInfo(): BuildInfo {
4040
return {
4141
time: BUILD_TIME,
4242
commit: BUILD_COMMIT,
43+
version: BUILD_VERSION,
4344
};
4445
}
4546

packages/api/src/system/system.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export type MaintenanceInfo = {
4444
export type BuildInfo = {
4545
time: string;
4646
commit: string;
47+
version: string;
4748
};
4849

4950
/**

packages/types/src/system.dto.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export const ReadAboutNodeResponse = z
4646
build: z.object({
4747
time: z.iso.datetime(),
4848
commit: z.string(),
49+
version: z.string(),
4950
}),
5051
public_key: z.string(),
5152
url: z.string().url(),

0 commit comments

Comments
 (0)