summaryrefslogtreecommitdiffstats
path: root/src/commands/release.rs
AgeCommit message (Collapse)Author
2021-01-30Update tokio: 0.2 -> 1.0, shipliftMatthias Beyer
Because tokio 1.0 does not ship with the Stream trait, this patch also introduces tokio_stream as new dependency. For more information, look here: https://docs.rs/tokio/1.0.3/tokio/stream/index.html Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-18Post-format clippy cleanupMatthias Beyer
This patch cleans some rustfmt code that was formatted, but where clippy had something to complain: a scope was unnecessary here, so remove it. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-18Run `cargo fmt`Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-01-18Add comments on subcommand implementationsMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-01-15Fix clippy: this `else { if .. }` block can be collapsedMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-15Fix clippy: `.map().collect()` can be replaced with `.try_for_each()`Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-14Update implementation for dedicated release tableMatthias Beyer
This patch updates the implementation for the dedicated release table. First of all, it updates the model types and adds the new `crate::db::models::Release` type for representing releases in the database (which are just pointers to the released artifact). The `db artifacts` command is updated by using a LEFT JOIN with the "releases" table. The `release` command is updated as well, though the change was a bit more complex. First of all, a LEFT OUTER JOIN was added which is essentially the same as the filter for un-released artifacts from before the change. Then, a `.select()` call was added, so we don't load all the objects we don't need anyways. This reduces overhead not only with the database querying but also in the code here, as we do not allocate objects from the database we destruct right away. The updating of the artifact object in the database was changed to generate a new release object in the "releases" table, of course. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-01-13Add LICENSE file and license headersMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-14Add debug output in release subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-07Deny macro_use from external crateMatthias Beyer
Diesel is an exception here, because the generated src/schema.rs file does not automatically contain the necessary imports. All imports were added where necessary. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-07Remove unused importsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-03Implement release subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>