Crates.io | uni_publisher |
lib.rs | uni_publisher |
version | 0.0.10 |
source | src |
created_at | 2020-07-19 23:15:52.180949 |
updated_at | 2020-12-14 08:24:21.389784 |
description | Simplifies crates publishing |
homepage | |
repository | |
max_upload_size | |
id | 267048 |
size | 61,148 |
The utility to simplify crates publishing from CI scripts
$ uni_publisher --token <CRATESIO_ACCESS_TOKEN> --manifest-path <path/to/Cargo.toml> --working-dir=</tmp/dir/>
It's common solution to use tags to trigger crates publishing. It doesn't looks good for me since the information about crate version now duplicated: you have one version in manifest and another in tags.
For example if you're downloaded main branch and check the version then you can't be sure if that version was published or not. And you can't be sure if the API from the repository will be ever published to crates.io.
Special branches may be used to reflect crate version. That approach doesn't fit well for repositories with multiple crates.
The other solution is to run uni_uploader for every crate from the repository for every commit. For development branches (without --token parameter) it'll just check that crate's version is reflecting crate's changes (bumped if crate content was changed). For main branch (with --token parameter), uni_uploader will automatically upload a crate to crates.io if the crate version was changed.