From 26d0432dcdca8c14e2ffc3bd1a5c8aad94ef78bf Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Wed, 13 Mar 2024 20:49:30 +0100 Subject: [PATCH] Squashed commit of the following: commit f56a1e64641b83a7f7a33ddf5ef86678a9e291e0 Author: dappnodedev <144998261+dappnodedev@users.noreply.github.com> Date: Tue Mar 12 14:48:10 2024 +0100 Add template mode to build command (#398) * Add build args for template mode and variants * Merge manifest and compose files * Build package variants * Build all variants if none is defined * Show DNP name on build * Separate build dirs * Fix build test * Improve build handler style * Perform modifications based on review * Improve error handling in compose load * Squashed commit of the following: commit 28cae58e44fda944233293d0b70c17de946ce3f0 Merge: dddaec8 ff912ae Author: dappnodedev <144998261+dappnodedev@users.noreply.github.com> Date: Tue Mar 12 12:15:35 2024 +0100 Merge pull request #402 from dappnode/dappnodedev/bump-js-yaml-version Bump js-yaml to 4.1.0 commit ff912ae44d2c14b42f8a495990ec61cd30cb4d69 Author: dappnodedev Date: Mon Mar 11 17:58:03 2024 +0100 Bump js-yaml to 4.1.0 * Replace template flag by variants or all-variants * Add templateMode flag to buildAndUpload * Add templateMode flag to build call commit 28cae58e44fda944233293d0b70c17de946ce3f0 Merge: dddaec8 ff912ae Author: dappnodedev <144998261+dappnodedev@users.noreply.github.com> Date: Tue Mar 12 12:15:35 2024 +0100 Merge pull request #402 from dappnode/dappnodedev/bump-js-yaml-version Bump js-yaml to 4.1.0 commit ff912ae44d2c14b42f8a495990ec61cd30cb4d69 Author: dappnodedev Date: Mon Mar 11 17:58:03 2024 +0100 Bump js-yaml to 4.1.0 --- src/files/manifest/readManifest.ts | 7 ++----- src/tasks/buildAndUpload.ts | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/files/manifest/readManifest.ts b/src/files/manifest/readManifest.ts index 77223ac4..0305529a 100644 --- a/src/files/manifest/readManifest.ts +++ b/src/files/manifest/readManifest.ts @@ -10,13 +10,10 @@ import { merge } from "lodash-es"; /** * Reads a manifest and optionally merges it with a variant manifest. */ -export function readManifest({ - paths, - variantPaths -}: { +export function readManifest( paths?: ManifestPaths, variantPaths?: ManifestPaths -}): { manifest: Manifest; format: ManifestFormat } { +): { manifest: Manifest; format: ManifestFormat } { try { const manifest = loadManifest(paths); diff --git a/src/tasks/buildAndUpload.ts b/src/tasks/buildAndUpload.ts index 8765c78d..3bac8229 100644 --- a/src/tasks/buildAndUpload.ts +++ b/src/tasks/buildAndUpload.ts @@ -89,7 +89,7 @@ export function buildAndUpload({ const variantPaths = templateMode && variantName ? { dir: path.join(variantsDirPath, variantName) } : undefined; // Load manifest #### Todo: Deleted check functions. Verify manifest beforehand - const { manifest, format } = readManifest({ paths: { dir }, variantPaths }); + const { manifest, format } = readManifest({ dir }, variantPaths); // Make sure the release is of correct type // eslint-disable-next-line @typescript-eslint/no-explicit-any