Skip to content

Commit

Permalink
Renamed and merged crates
Browse files Browse the repository at this point in the history
@chevdor still owns the package on crates.io, and refuses to allow
parity to publish it

And maybe instead of two crates, we only need one?
  • Loading branch information
mutantcornholio committed Sep 2, 2024
1 parent 5395a4f commit c80cf7b
Show file tree
Hide file tree
Showing 34 changed files with 107 additions and 357 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ jobs:
run: cargo set-version "$(echo "${{ github.ref_name }}" | sed -e 's/^v//')"

- name: Build and publish prdoclib
run: cargo publish -p prdoclib --token "${CRATESIO_TOKEN}"
env:
CRATESIO_TOKEN: ${{ secrets.CRATESIO_TOKEN }}

- name: Build and publish prdoc
# `set-version` will change Cargo.toml in `cli` package as it depends on `prdoclib`
# thus, we need --allow-dirty, to include uncommitted changes;
run: cargo publish --allow-dirty -p prdoc --token "${CRATESIO_TOKEN}"
run: cargo publish -p parity-prdoc --token "${CRATESIO_TOKEN}"
env:
CRATESIO_TOKEN: ${{ secrets.CRATESIO_TOKEN }}
63 changes: 26 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 36 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace.package]
[package]
name = "parity-prdoc"
version = "0.0.0-updated-from-ci"
authors = ["chevdor <chevdor@gmail.com>", "Wilfried Kopp <wilfried@parity.io>", "Yuri Volkov <0@mcornholio.ru>"]
edition = "2021"
Expand All @@ -7,16 +8,44 @@ keywords = ["cli", "documentation", "parity"]
license = "MIT"
repository = "https://github.com/paritytech/prdoc"

[workspace]
resolver = "2"
members = [
"cli",
"prdoclib",
]
[lib]
name = "prdoclib"
path = "src/lib.rs"

[[bin]]
name = "prdoc"

[profile.production]
inherits = "release"
lto = true
panic = "abort"
opt-level = "z"
codegen-units = 1

[dependencies]
log = "0.4"
regex = "1.10"
exitcode = "1.1"
thiserror = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_yaml = { version = "0.9", optional = false }
serde_json = { version = "1.0", optional = false }
valico = { version = "4.0", default-features = false, features = [] }
toml = "0.8.19"
assert_cmd = "2.0"
color-eyre = "0.6"
env_logger = "0.11"
clap = { version = "4", features = [
"derive",
"env",
"unicode",
"cargo",
"color",
"help",
"usage",
"error-context",
"suggestions",
] }

[dev-dependencies]
assert_cmd = "2.0"
12 changes: 6 additions & 6 deletions cli/build.rs → build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ pub fn generate_cargo_key_build_date() {
Ok(o) if o.status.success() => {
let sha = String::from_utf8_lossy(&o.stdout).trim().to_owned();
Cow::from(sha)
}
},
Ok(o) => {
let status = o.status;
println!("cargo:warning=Failed fetching the date timestamp: {status}");
Cow::from("unknown")
}
},
Err(err) => {
println!("cargo:warning=Failed fetching the datge: {err}");
Cow::from("unknown")
}
},
};

println!("cargo:rustc-env=PRDOC_CLI_BUILD_DATE={build_date}");
Expand All @@ -38,16 +38,16 @@ pub fn generate_cargo_key_git() {
Ok(o) if o.status.success() => {
let tmsp = String::from_utf8_lossy(&o.stdout).trim().to_owned();
Cow::from(tmsp)
}
},
Ok(o) => {
let status = o.status;
println!("cargo:warning=Git command failed with status: {status}");
Cow::from("unknown")
}
},
Err(err) => {
println!("cargo:warning=Failed to execute git command: {err}");
Cow::from("unknown")
}
},
}
};

Expand Down
4 changes: 0 additions & 4 deletions cli/.rustfmt.toml

This file was deleted.

39 changes: 0 additions & 39 deletions cli/Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion cli/README.md

This file was deleted.

65 changes: 0 additions & 65 deletions cli/tests/check.rs

This file was deleted.

11 changes: 0 additions & 11 deletions cli/tests/common.rs

This file was deleted.

47 changes: 0 additions & 47 deletions cli/tests/generate.rs

This file was deleted.

Loading

0 comments on commit c80cf7b

Please sign in to comment.