Skip to content

Commit

Permalink
docs(core): add example for affected by tags (#16986)
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder authored May 12, 2023
1 parent 25e8439 commit b8e9f3d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/generated/cli/affected.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ Run tests for all the projects affected by the last commit on main:
nx affected -t test --base=main~1 --head=main
```

Run build for only projects with the tag `dotnet`:

```shell
nx affected -t build --exclude '*,!tag:dotnet'
```

Use the currently executing project name in your command.:

```shell
Expand Down
6 changes: 6 additions & 0 deletions docs/generated/packages/nx/documents/affected.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ Run tests for all the projects affected by the last commit on main:
nx affected -t test --base=main~1 --head=main
```

Run build for only projects with the tag `dotnet`:

```shell
nx affected -t build --exclude '*,!tag:dotnet'
```

Use the currently executing project name in your command.:

```shell
Expand Down
4 changes: 4 additions & 0 deletions packages/nx/src/command-line/examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export const examples: Record<string, Example[]> = {
description:
'Run tests for all the projects affected by the last commit on main',
},
{
command: "affected -t build --exclude '*,!tag:dotnet'",
description: 'Run build for only projects with the tag `dotnet`',
},
{
command: 'affected -t build --tag=$NX_TASK_TARGET_PROJECT:latest',
description: 'Use the currently executing project name in your command.',
Expand Down

1 comment on commit b8e9f3d

@vercel
Copy link

@vercel vercel bot commented on b8e9f3d May 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx.dev
nx-five.vercel.app

Please sign in to comment.