如何将包发布到 ESP-IDF 组件仓库
要将包上传到 ESP-IDF 组件仓库,你需要按照以下步骤操作:
创建账号:首先,你需要在 ESP-IDF 组件仓库网站上创建账号。访问 ESP-IDF 组件仓库,点击 Log in 按钮即可。通常使用 GitHub 账号登录。
接下来,一般需要将包上传到 staging profile。
为此,首先激活你的 ESP-IDF 环境(假设你已安装 ESP-IDF;若未安装,可参考 Espressif EIM,即 ESP-IDF Installation Manager)。
activate_espidf.sh
source ~/.espressif/v6.0.1/esp-idf/export.sh然后,你可以使用 compote 工具上传包。命令如下:
upload_staging.sh
compote component upload --profile "staging" --name my_component --namespace mygithubusername请将 my_component 替换为你的组件名称,将 mygithubusername 替换为你的 GitHub 用户名。
如果你想上传到 production profile(即所有人可访问),可以使用相同命令,只需去掉 --profile "staging" 部分:
upload_production.sh
compote component upload --name my_component --namespace mygithubusernameIf this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow