Crates.io | tagen |
lib.rs | tagen |
version | 0.1.0 |
source | src |
created_at | 2022-09-23 13:33:42.288106 |
updated_at | 2022-09-23 13:33:42.288106 |
description | Generates lots of tags by version and variants. |
homepage | https://github.com/siketyan/tagen |
repository | https://github.com/siketyan/tagen.git |
max_upload_size | |
id | 672498 |
size | 15,477 |
Generates lots of tags by version and variants.
When tagging Docker images or GitHub Actions, we often use lots of tag variants something like:
rust:1.64.0
rust:1.64.0-bullseye-slim
rust:1.64-bullseye
rust:1.64
rust:1
This style is very convenient for image users, but it is difficult to list them correctly. We tried to generate these automatically from the given version and variants.
If you do NOT want to use tagen on your code, use this installation.
cargo install tagen --features=cli
tagen is a hybrid crate, this mean you can use it on your own code.
[dependencies]
tagen = "0.1"
Well done!
Let's start with the simplest style:
tagen 1.64.0
It generates:
1
1.64
1.64.0
Easy!
Now add variants to them:
tagpr 1.64.0 bullseye slim
It generates:
1-bullseye-slim
1-slim
1.64-bullseye-slim
1.64-slim
1.64.0-bullseye-slim
1.64.0-slim
Note that variants are shorten to right variant: a b c
variants to be a-b-c
, b-c
, and c
.
a
and a-b
are not generated in this case to avoid conflicting with a
or a b
variants.