mirror of
https://github.com/tale/headplane.git
synced 2026-07-26 15:58:14 +00:00
feat: append -next to pre-release versions in pnpm build
This commit is contained in:
+3
-1
@@ -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
@@ -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),
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user