feat: append -next to pre-release versions in pnpm build

This commit is contained in:
Aarnav Tale
2025-06-24 11:04:24 -04:00
parent ecc547601f
commit fc7bedc8b1
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -34,7 +34,9 @@ COPY . .
RUN mise trust
COPY --from=go-build /build/app/hp_ssh.wasm /build/app/hp_ssh.wasm
COPY --from=go-build /build/app/wasm_exec.js /build/app/wasm_exec.js
RUN pnpm run build
ARG IMAGE_TAG
RUN IMAGE_TAG=$IMAGE_TAG pnpm run build
RUN mkdir -p /var/lib/headplane/agent
FROM gcr.io/distroless/nodejs22-debian12:nonroot AS final
+2 -1
View File
@@ -13,6 +13,7 @@ if (prefix.endsWith('/')) {
// Load the version via package.json
const pkg = await readFile('package.json', 'utf-8');
const isNext = process.env.IMAGE_TAG?.includes('next');
const { version } = JSON.parse(pkg);
if (!version) {
throw new Error('Unable to read version from package.json');
@@ -42,7 +43,7 @@ export default defineConfig(({ isSsrBuild }) => ({
include: ['@libsql/client'],
},
define: {
__VERSION__: JSON.stringify(version),
__VERSION__: JSON.stringify(isNext ? `${version}-next` : version),
__PREFIX__: JSON.stringify(prefix),
},
}));