Skip to content

Commit a4a301b

Browse files
committed
feat: added category
1 parent c6b7973 commit a4a301b

4 files changed

Lines changed: 14 additions & 218 deletions

File tree

Cargo.toml.liquid

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,11 @@ version = "0.1.0"
55
edition = "2021"
66
documentation = ""
77
repository = ""
8-
categories = ["command-line-utilities"]
9-
keywords = ["cli"]
8+
categories = ["{{ package_category }}"]
9+
keywords = ["{{ package_category }}"]
1010
{% if license == "MIT" %}
1111
license = "MIT"
1212
{% endif %}
13-
{% if license == "APACHE" %}
14-
license = "Apache-2.0"
15-
{% endif %}
16-
{% if license == "all" %}
17-
license = "MIT OR Apache-2.0"
18-
{% endif %}
1913
[dependencies]
2014
{% if sentry == true %}
2115
sentry = "0.34.0"

LICENSE-APACHE.liquid

Lines changed: 0 additions & 201 deletions
This file was deleted.

cargo-generate.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ type = "string"
1313
prompt = "Enter a project description"
1414

1515
[placeholders.license]
16-
type = "string"
17-
prompt = "What licenses will the project have?"
18-
default = "all"
19-
choices = ["all", "MIT", "APACHE"]
16+
type = "bool"
17+
prompt = "Do you want to include a MIT License?"
18+
default = false
2019

2120
[placeholders.email]
2221
type = "string"
@@ -31,6 +30,11 @@ type = "string"
3130
prompt = "What is the rust toolchain version?"
3231
choices = ["stable", "beta", "nightly"]
3332

33+
[placeholders.package_category]
34+
type = "string"
35+
prompt = "What is the category of your package?"
36+
choices = ["accessibility", "aerospace", "algorithms", "asynchronous", "command-line-utilities", "web-programming", "config"]
37+
3438
[placeholders.github_release]
3539
type = "bool"
3640
prompt = "Do you want to create a github release?"
@@ -45,11 +49,8 @@ default = false
4549
# Conditions
4650
## License
4751

48-
[conditional.'license == MIT']
49-
ignore = ["LICENSE-APACHE"]
50-
51-
[conditional. 'license == APACHE']
52-
ignore = ["LICENSE-MIT"]
52+
[conditional.'license == false']
53+
exclude = ["LICENSE-MIT.liquid"]
5354

5455
## Workflows
5556
[conditional.'github_release == false']

src/functions.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::env;
2+
13
/// # Panics
24
/// Will panic if `SENTRY_DSN` is not set in the .env file
35
#[inline]

0 commit comments

Comments
 (0)