diff --git a/packages/nx-python/src/executors/publish/executor.ts b/packages/nx-python/src/executors/publish/executor.ts index c327414..b09e4c2 100644 --- a/packages/nx-python/src/executors/publish/executor.ts +++ b/packages/nx-python/src/executors/publish/executor.ts @@ -51,9 +51,16 @@ export default async function executor( chalk`\n {bold Publishing project {bgBlue ${context.projectName} }...}\n`, ); - await runPoetry(['publish', ...(options.__unparsed__ ?? [])], { - cwd: buildFolderPath, - }); + await runPoetry( + [ + 'publish', + ...(options.dryRun ? ['--dry-run'] : []), + ...(options.__unparsed__ ?? []), + ], + { + cwd: buildFolderPath, + }, + ); removeSync(buildFolderPath); diff --git a/packages/nx-python/src/executors/publish/schema.d.ts b/packages/nx-python/src/executors/publish/schema.d.ts index d46fd79..b9fd971 100644 --- a/packages/nx-python/src/executors/publish/schema.d.ts +++ b/packages/nx-python/src/executors/publish/schema.d.ts @@ -1,5 +1,6 @@ export interface PublishExecutorSchema { silent: boolean; buildTarget: string; + dryRun: boolean; __unparsed__?: string[]; } diff --git a/packages/nx-python/src/executors/publish/schema.json b/packages/nx-python/src/executors/publish/schema.json index 56fd550..1450198 100644 --- a/packages/nx-python/src/executors/publish/schema.json +++ b/packages/nx-python/src/executors/publish/schema.json @@ -14,6 +14,11 @@ "description": "Hide output text.", "default": false }, + "dryRun": { + "type": "boolean", + "description": "Do not publish the package.", + "default": false + }, "__unparsed__": { "hidden": true, "type": "array",