pub uploader

Uploader 命令是 Pub 工具 中的一个命令。

Uploader is one of the commands of the pub tool.

$ pub uploader [options] {add/remove} <email>

该命令允许 pub.dev 网站上某个 Package 的 上传者 为该 Package 添加或删除其它的上传者。其有两个子命令 addremove,可以将电子邮件地址作为某个上传者的标识以此来添加或删除上传者。例如:

This command allows uploaders of a package on the pub.dev site to add (invite) or remove other uploaders for that package. It has two sub-commands, add and remove, that take the email address of the person to add/remove as an uploader. For example:

~/code/transmogrify$ pub uploader add bob@example.com
We have sent an invitation to bob@example.com, they will be added as uploader after they confirm it.
// 我们已经向 bob@example.com 发送了一份邀请函,在他/她确认后就会成被加入上传者(权限)

~/code/transmogrify$ pub uploader remove bob@example.com
Successfully removed uploader from package.
// 成功将该上传者从 package 中移除

如果 Package 有且只有一个上传者,则该上传者不能再被删除。你可以将自己从上传者列表中删除(只要 Package 中还有其它的上传者即可),但是一旦你删除了自己后则不能再将自己添加回去。

If a package has only one uploader, that uploader can’t be removed. You can remove yourself as an uploader (as long as other uploaders are available), but you can’t re-add yourself again afterwards.

默认情况下,你修改的是当前工作目录中 Package 的上传者。你可以通过 --package 标识来指定修改哪个 Package 的上传者。例如:

By default, the package in the current working directory will have its uploaders modified. You can also pass the --package flag to choose a package by name. For example:

$ pub uploader --package=transmogrify add bob@example.com
We have sent an invitation to bob@example.com, they will be added as uploader after they confirm it.
// 我们已经向 bob@example.com 发送了一份邀请函,在他/她确认后就会成被加入上传者(权限)

需要注意的是 Google 账户是上传者的识别标识,所以请使用 Gmail 或者 Google 应用电子邮件地址作为新上传者的标识。

Note that uploaders are identified by their Google accounts, so use a Gmail or Google Apps email address for any new uploaders.

选项

Options

你可以查阅 全局选项 获取 Pub 命令所支持的命令选项。

For options that apply to all pub commands, see Global options.