Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
43 changes: 2 additions & 41 deletions docs/cli/releases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,29 +116,9 @@ which is creating a release with a specified number of commits (see the section
sentry-cli releases set-commits "$VERSION" --auto --ignore-missing
```

## Managing Release Artifacts
## Upload Source Maps

When you are working with JavaScript and other platforms, you can upload release artifacts to Sentry which are then considered during processing. The most common release artifact are [source maps](/platforms/javascript/sourcemaps/) for which `sentry-cli` has specific support.

To manage release artifacts the `sentry-cli files` command can be used which itself provides various sub commands.

### Upload Files

The most common use case is to upload files. For the generic upload the `sentry-cli files upload` command can be used. However since most release artifacts are JavaScript source map related we have a [Upload Source Maps](#sentry-cli-sourcemaps) convenience method for that.

Files uploaded are typically named with a full (eg: `http://example.com/foo.js`) or truncated URL (eg: `~/foo.js`).

Release artifacts are only considered at time of event processing. So while it’s possible to modify release artifacts after the fact they will only be considered for future events of that release.

The first argument to `upload` is the path to the file, the second is an optional URL we should associate it with. Note that if you want to use an abbreviated URL (eg: `~/foo.js`) make sure to use single quotes to avoid the expansion by the shell to your home folder.

```bash
sentry-cli files upload --release "$VERSION" /path/to/file '~/file.js'
```

### Upload Source Maps

For source map upload, a separate command is provided which assists you in uploading and verifying source maps:
You can upload sourcemaps via the `sentry-cli sourcemaps upload` command:

```bash
sentry-cli sourcemaps upload /path/to/sourcemaps
Expand Down Expand Up @@ -212,25 +192,6 @@ sentry-cli sourcemaps upload /path/to/sourcemaps --url-prefix '~/static/js' \
sentry-cli sourcemaps upload /path/to/sourcemaps --ignore-file .sentryignore
```

### List Files

To list uploaded files, the following command can be used:

```bash
sentry-cli files list --release "$VERSION"
```

This will return a list of all uploaded files for that release.

### Delete Files

You can also delete already uploaded files. Either by name or all files at once:

```bash
sentry-cli files delete --release "$VERSION" NAME_OF_FILE
sentry-cli files delete --release "$VERSION" --all
```

## Creating Deploys

You can also associate deploys with releases. To create a deploy you first create a release and then a deploy for it. At the very least, you should supply the “environment” the deploy goes to (production, staging etc.). You can freely define this:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ If you have the same (incorrect) results locally as you do via Sentry, double-ch

The Sentry API currently only works with source maps and source files that are uploaded as plain text (UTF-8 encoded). If the files are uploaded in a compressed format (for example, gzip), they will be not be interpreted correctly.

If you are using `sentry-cli` to upload your artifacts, starting with version `2.4.0` you can add the `--decompress` flag to your `sourcemaps upload` or `files upload` commands.
If you are using `sentry-cli` to upload your artifacts, starting with version `2.4.0` you can add the `--decompress` flag to your `sourcemaps upload` commands.

Sometimes build scripts and plugins produce pre-compressed minified files (for example, webpack's [compression plugin](https://github.com/webpack/compression-webpack-plugin)). In these cases, you'll need to disable such plugins and perform the compression **after** the generated source maps/source files have been uploaded to Sentry.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ If you have the same (incorrect) results locally as you do via Sentry, double-ch

The Sentry API currently only works with source maps and source files that are uploaded as plain text (UTF-8 encoded). If the files are uploaded in a compressed format (for example, gzip), they will be not be interpreted correctly.

If you are using `sentry-cli` to upload your artifacts, starting with version `2.4.0` you can add the `--decompress` flag to your `sourcemaps upload` or `files upload` commands.
If you are using `sentry-cli` to upload your artifacts, starting with version `2.4.0` you can add the `--decompress` flag to your `sourcemaps upload` commands.

Sometimes build scripts and plugins produce pre-compressed minified files (for example, webpack's [compression plugin](https://github.com/webpack/compression-webpack-plugin)). In these cases, you'll need to disable such plugins and perform the compression **after** the generated source maps/source files have been uploaded to Sentry.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ If you have the same (incorrect) results locally as you do via Sentry, double-ch

The Sentry API currently only works with source maps and source files that are uploaded as plain text (UTF-8 encoded). If the files are uploaded in a compressed format (for example, gzip), they will be not be interpreted correctly.

If you are using `sentry-cli` to upload your artifacts, starting with version `2.4.0` you can add the `--decompress` flag to your `sourcemaps upload` or `files upload` commands.
If you are using `sentry-cli` to upload your artifacts, starting with version `2.4.0` you can add the `--decompress` flag to your `sourcemaps upload` commands.

Sometimes build scripts and plugins produce pre-compressed minified files (for example, webpack's [compression plugin](https://github.com/webpack/compression-webpack-plugin)). In these cases, you'll need to disable such plugins and perform the compression **after** the generated source maps/source files have been uploaded to Sentry.

Expand Down