Sentry—重写选项失败命令



我正在考虑通过重写源映射来改进CI进程,但发现我无法在任何位置添加--rewrite选项。

我添加到的命令是:

sentint-cli--auth令牌$sentry_token releases-o"我的组织"文件$LONG_COMMIT上载my_repo/my_files'~/my_public_folder'

无论我把它放在哪里,我总是会得到错误:

错误:找到了不需要的或在此上下文中无效的参数"--rewrite"用法:sentint-cli释放上传文件[OPTIONS][--][NAME]

例如,我尝试过:

sentint-cli--auth令牌$sentry_token releases-o"我的组织"文件$LONG_COMMIT上载my_repo/my_files'~/my_public_folder'--重写

sentint-cli--身份验证令牌$sentry_token releases-o"我的组织"文件$LONG_COMMIT上载my_repo/my_files--重写'~/my_public_folder'

sentint-cli--身份验证令牌$sentry_token releases-o"我的组织"文件$LONG_COMMIT上载--重写my_repo/my_files'~/my_public_folder'

--rewrite选项不适用于sentry-cli releases files upload。我相信您正在寻找sentry-cli releases files upload-sourcemaps命令。

请注意,自sentrycli 1.59.0起,默认情况下已删除并启用--rewrite选项。您可以选择不使用--no-rewrite选项进行重写:

$ sentry-cli releases files upload-sourcemaps --help
Upload sourcemaps for a release.
USAGE:
sentry-cli releases files <VERSION> upload-sourcemaps [OPTIONS] <PATHS>...
OPTIONS:
...
--no-rewrite
Disables rewriting of matching sourcemaps. By default the tool will rewrite sources, so
that indexed maps are flattened and missing sources are inlined if possible.
This fundamentally changes the upload process to be based on sourcemaps and minified
files exclusively and comes in handy for setups like react-native that generate
sourcemaps that would otherwise not work for sentry.

最新更新