Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): alpha implementation of nx release #19110

Merged
merged 15 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 170 additions & 0 deletions docs/generated/cli/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
---
title: 'release - CLI command'
description: '**ALPHA**: Orchestrate versioning and publishing of applications and libraries'
---

# release

**ALPHA**: Orchestrate versioning and publishing of applications and libraries

## Usage

```shell
nx release
```

Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.

## Options

### dryRun

Type: `boolean`

Default: `false`

Preview the changes without updating files/creating releases

### groups

Type: `string`

One or more release groups to target with the current command.

### help

Type: `boolean`

Show help

### projects

Type: `string`

Projects to run. (comma/space delimited project names and/or patterns)

### version

Type: `boolean`

Show version number

## Subcommands

### version

Create a version and release for one or more applications and libraries

```shell
nx release version [specifier]
```

#### Options

##### help

Type: `boolean`

Show help

##### specifier

Type: `string`

Exact version or semver keyword to apply to the selected release group.

##### version

Type: `boolean`

Show version number

### changelog

Generate a changelog for one or more projects, and optionally push to Github

```shell
nx release changelog [version]
```

#### Options

##### from

Type: `string`

The git reference to use as the start of the changelog. If not set it will attempt to resolve the latest tag and use that

##### gitRemote

Type: `string`

Default: `origin`

Alternate git remote in the form {user}/{repo} on which to create the Github release (useful for testing)

##### help

Type: `boolean`

Show help

##### interactive

Type: `boolean`

##### tagVersionPrefix

Type: `string`

Default: `v`

Prefix to apply to the version when creating the Github release tag

##### to

Type: `string`

Default: `HEAD`

The git reference to use as the end of the changelog

##### version

Type: `string`

The version to create a Github release and changelog for

### publish

Publish a versioned project to a registry

```shell
nx release publish
```

#### Options

##### help

Type: `boolean`

Show help

##### registry

Type: `string`

The registry to publish to

##### tag

Type: `string`

The distribution tag to apply to the published package

##### version

Type: `boolean`

Show version number
9 changes: 9 additions & 0 deletions docs/generated/devkit/NxJsonConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Nx.json configuration
- [npmScope](../../devkit/documents/NxJsonConfiguration#npmscope): string
- [plugins](../../devkit/documents/NxJsonConfiguration#plugins): string[]
- [pluginsConfig](../../devkit/documents/NxJsonConfiguration#pluginsconfig): Record<string, unknown>
- [release](../../devkit/documents/NxJsonConfiguration#release): NxReleaseConfiguration
- [targetDefaults](../../devkit/documents/NxJsonConfiguration#targetdefaults): TargetDefaults
- [tasksRunnerOptions](../../devkit/documents/NxJsonConfiguration#tasksrunneroptions): Object
- [workspaceLayout](../../devkit/documents/NxJsonConfiguration#workspacelayout): Object
Expand Down Expand Up @@ -163,6 +164,14 @@ Configuration for Nx Plugins

---

### release

• `Optional` **release**: `NxReleaseConfiguration`

**ALPHA**: Configuration for `nx release` (versioning and publishing of applications and libraries)

---

### targetDefaults

• `Optional` **targetDefaults**: `TargetDefaults`
Expand Down
13 changes: 13 additions & 0 deletions docs/generated/devkit/Workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use ProjectsConfigurations or NxJsonConfiguration
- [plugins](../../devkit/documents/Workspace#plugins): string[]
- [pluginsConfig](../../devkit/documents/Workspace#pluginsconfig): Record<string, unknown>
- [projects](../../devkit/documents/Workspace#projects): Record<string, ProjectConfiguration>
- [release](../../devkit/documents/Workspace#release): NxReleaseConfiguration
- [targetDefaults](../../devkit/documents/Workspace#targetdefaults): TargetDefaults
- [tasksRunnerOptions](../../devkit/documents/Workspace#tasksrunneroptions): Object
- [version](../../devkit/documents/Workspace#version): number
Expand Down Expand Up @@ -219,6 +220,18 @@ Projects' projects

---

### release

• `Optional` **release**: `NxReleaseConfiguration`

**ALPHA**: Configuration for `nx release` (versioning and publishing of applications and libraries)

#### Inherited from

[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[release](../../devkit/documents/NxJsonConfiguration#release)

---

### targetDefaults

• `Optional` **targetDefaults**: `TargetDefaults`
Expand Down
24 changes: 24 additions & 0 deletions docs/generated/manifests/menus.json
Original file line number Diff line number Diff line change
Expand Up @@ -7056,6 +7056,14 @@
"isExternal": false,
"disableCollapsible": false
},
{
"id": "release-publish",
"path": "/packages/js/executors/release-publish",
"name": "release-publish",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "verdaccio",
"path": "/packages/js/executors/verdaccio",
Expand Down Expand Up @@ -7097,6 +7105,14 @@
"isExternal": false,
"disableCollapsible": false
},
{
"id": "release-version",
"path": "/packages/js/generators/release-version",
"name": "release-version",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "setup-verdaccio",
"path": "/packages/js/generators/setup-verdaccio",
Expand Down Expand Up @@ -7776,6 +7792,14 @@
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "release",
"path": "/packages/nx/documents/release",
"id": "release",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"isExternal": false,
Expand Down
29 changes: 29 additions & 0 deletions docs/generated/manifests/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,15 @@
"path": "/packages/js/executors/node",
"type": "executor"
},
"/packages/js/executors/release-publish": {
"description": "DO NOT INVOKE DIRECTLY WITH `nx run`. Use `nx release publish` instead.",
"file": "generated/packages/js/executors/release-publish.json",
"hidden": true,
"name": "release-publish",
"originalFilePath": "/packages/js/src/executors/release-publish/schema.json",
"path": "/packages/js/executors/release-publish",
"type": "executor"
},
"/packages/js/executors/verdaccio": {
"description": "Start local registry with verdaccio",
"file": "generated/packages/js/executors/verdaccio.json",
Expand Down Expand Up @@ -1048,6 +1057,15 @@
"path": "/packages/js/generators/convert-to-swc",
"type": "generator"
},
"/packages/js/generators/release-version": {
"description": "DO NOT INVOKE DIRECTLY WITH `nx generate`. Use `nx release version` instead.",
"file": "generated/packages/js/generators/release-version.json",
"hidden": true,
"name": "release-version",
"originalFilePath": "/packages/js/src/generators/release-version/schema.json",
"path": "/packages/js/generators/release-version",
"type": "generator"
},
"/packages/js/generators/setup-verdaccio": {
"description": "Setup Verdaccio for local package management.",
"file": "generated/packages/js/generators/setup-verdaccio.json",
Expand Down Expand Up @@ -1773,6 +1791,17 @@
"path": "/packages/nx/documents/view-logs",
"tags": [],
"originalFilePath": "generated/cli/view-logs"
},
"/packages/nx/documents/release": {
"id": "release",
"name": "release",
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
"file": "generated/packages/nx/documents/release",
"itemList": [],
"isExternal": false,
"path": "/packages/nx/documents/release",
"tags": [],
"originalFilePath": "generated/cli/release"
}
},
"root": "/packages/nx",
Expand Down
29 changes: 29 additions & 0 deletions docs/generated/packages-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,15 @@
"path": "js/executors/node",
"type": "executor"
},
{
"description": "DO NOT INVOKE DIRECTLY WITH `nx run`. Use `nx release publish` instead.",
"file": "generated/packages/js/executors/release-publish.json",
"hidden": true,
"name": "release-publish",
"originalFilePath": "/packages/js/src/executors/release-publish/schema.json",
"path": "js/executors/release-publish",
"type": "executor"
},
{
"description": "Start local registry with verdaccio",
"file": "generated/packages/js/executors/verdaccio.json",
Expand Down Expand Up @@ -1032,6 +1041,15 @@
"path": "js/generators/convert-to-swc",
"type": "generator"
},
{
"description": "DO NOT INVOKE DIRECTLY WITH `nx generate`. Use `nx release version` instead.",
"file": "generated/packages/js/generators/release-version.json",
"hidden": true,
"name": "release-version",
"originalFilePath": "/packages/js/src/generators/release-version/schema.json",
"path": "js/generators/release-version",
"type": "generator"
},
{
"description": "Setup Verdaccio for local package management.",
"file": "generated/packages/js/generators/setup-verdaccio.json",
Expand Down Expand Up @@ -1754,6 +1772,17 @@
"path": "nx/documents/view-logs",
"tags": [],
"originalFilePath": "generated/cli/view-logs"
},
{
"id": "release",
"name": "release",
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
"file": "generated/packages/nx/documents/release",
"itemList": [],
"isExternal": false,
"path": "nx/documents/release",
"tags": [],
"originalFilePath": "generated/cli/release"
}
],
"executors": [
Expand Down
32 changes: 32 additions & 0 deletions docs/generated/packages/js/executors/release-publish.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "release-publish",
"implementation": "/packages/js/src/executors/release-publish/release-publish.impl.ts",
"schema": {
"$schema": "http://json-schema.org/schema",
"version": 2,
"title": "Implementation details of `nx release publish`",
"description": "DO NOT INVOKE DIRECTLY WITH `nx run`. Use `nx release publish` instead.",
"type": "object",
"properties": {
"packageRoot": {
"type": "string",
"description": "The root directory of the directory (containing a manifest file at its root) to publish. Defaults to the project root."
},
"registry": {
"type": "string",
"description": "The registry to publish the package to."
},
"tag": {
"type": "string",
"description": "The distribution tag to apply to the published package."
}
},
"required": [],
"presets": []
},
"description": "DO NOT INVOKE DIRECTLY WITH `nx run`. Use `nx release publish` instead.",
"hidden": true,
"aliases": [],
"path": "/packages/js/src/executors/release-publish/schema.json",
"type": "executor"
}
Loading