Skip to content

Commit 8c55c3d

Browse files
authored
Replace actual structure with the typst-project crate made by @tingerrr (#12)
* add: typst-project * fix: stop generate release notes for dev branches * fix: errors are now handled
1 parent bd82005 commit 8c55c3d

File tree

11 files changed

+236
-414
lines changed

11 files changed

+236
-414
lines changed

.github/workflows/pre-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
token: "${{ secrets.GITHUB_TOKEN }}"
8686
prerelease: true
8787
tag_name: ${{ steps.extract_branch.outputs.branch }}-${{ steps.short-sha.outputs.sha }}
88-
generate_release_notes: true
88+
generate_release_notes: false
8989
files: |
9090
utpm-${{ matrix.target }}.*
9191

Cargo.lock

Lines changed: 5 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dirs = "5.0"
1010
serde_json = "1.0"
1111
serde = { version = "1.0", features = ["derive"] }
1212
serde_with = "1.0"
13-
toml = { version = "0.7.5", features = ["display"] }
13+
toml = { version = "^0.8.14", features = ["display"] }
1414
inquire = "0.6.2"
1515
semver = { version = "1.0.18", features = ["serde"] }
1616
spdx = { version = "0.10.2", features = ["text"] }
@@ -26,7 +26,7 @@ name = "utpm"
2626
path = "src/main.rs"
2727

2828
[[bin]]
29-
name = "utpm-CI"
29+
name = "utpm-ci"
3030
path = "src/ci.rs"
3131

3232
[features]

src/commands.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ pub mod unlink;
99
pub mod list;
1010

1111
use clap::{Parser, Subcommand};
12-
13-
use crate::utils::specs::{Categorie, Discipline};
12+
use typst_project::manifest::{categories::Category, disciplines::Discipline};
1413

1514
#[derive(Parser, Clone, Debug)]
1615
pub struct CreateArgs {
@@ -75,7 +74,7 @@ pub struct CreateArgs {
7574
populate: bool,
7675

7776
#[arg(short = 'C', long)]
78-
categories: Option<Vec<Categorie>>,
77+
categories: Option<Vec<Category>>,
7978

8079
#[arg(short = 'D', long)]
8180
disciplines: Option<Vec<Discipline>>,

src/commands/bulk_delete.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub fn run(cmd: &BulkDeleteArgs) -> Result<bool> {
1515
yes: true,
1616
namespace: cmd.namespace.to_owned(),
1717
version: if name_and_version.len() > 1 {
18-
Some(semver::Version::parse(name_and_version[1].as_str()).unwrap())
18+
Some(semver::Version::parse(name_and_version[1].as_str())?)
1919
} else {
2020
None
2121
},

0 commit comments

Comments
 (0)