Skip to content

Commit

Permalink
refactor!: remove the deprecated cargo-packager-config crate (#43)
Browse files Browse the repository at this point in the history
* refactor!: remove the deprecated `cargo-packager-config` crate

* clippy
  • Loading branch information
amr-crabnebula authored Oct 9, 2023
1 parent 52e9d29 commit dde1ab3
Show file tree
Hide file tree
Showing 26 changed files with 328 additions and 1,676 deletions.
5 changes: 5 additions & 0 deletions .changes/config-removed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cargo-packager": "minor"
---

Remove the deprecated `cargo-packager-config` dependency.
10 changes: 0 additions & 10 deletions .changes/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@
}
},
"packages": {
"cargo-packager-config": {
"path": "./crates/config",
"manager": "rust",
"assets": [
{
"path": "${ pkg.path }/target/package/cargo-packager-config-${ pkgFile.version }.crate",
"name": "${ pkg.pkg }-${ pkgFile.version }.crate"
}
]
},
"cargo-packager": {
"path": "./crates/packager",
"manager": "rust",
Expand Down
30 changes: 18 additions & 12 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,38 @@ concurrency:
cancel-in-progress: true

jobs:
clippy:
fmt:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check

clippy:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: install webkit2gtk
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings

fmt:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check

test:
strategy:
fail-fast: false
Expand Down
15 changes: 3 additions & 12 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/config-schema-generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ license.workspace = true
repository.workspace = true

[build-dependencies]
cargo-packager-config = { path = "../config" }
cargo-packager = { path = "../packager", features = ["schema"] }
serde_json = { workspace = true }
schemars = { workspace = true }
8 changes: 3 additions & 5 deletions crates/config-schema-generator/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ use std::{
};

pub fn main() -> Result<(), Box<dyn Error>> {
let schema = schemars::schema_for!(cargo_packager_config::Config);
let schema = schemars::schema_for!(cargo_packager::Config);
let schema_str = serde_json::to_string_pretty(&schema).unwrap();
let crate_dir = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR")?);
for file in ["../packager/schema.json", "../config/schema.json"] {
let mut schema_file = BufWriter::new(File::create(crate_dir.join(file))?);
write!(schema_file, "{schema_str}")?;
}
let mut schema_file = BufWriter::new(File::create(crate_dir.join("../packager/schema.json"))?);
write!(schema_file, "{schema_str}")?;
Ok(())
}
5 changes: 0 additions & 5 deletions crates/config/CHANGELOG.md

This file was deleted.

21 changes: 0 additions & 21 deletions crates/config/Cargo.toml

This file was deleted.

177 changes: 0 additions & 177 deletions crates/config/LICENSE_APACHE-2.0

This file was deleted.

23 changes: 0 additions & 23 deletions crates/config/LICENSE_MIT

This file was deleted.

7 changes: 0 additions & 7 deletions crates/config/README.md

This file was deleted.

Loading

0 comments on commit dde1ab3

Please sign in to comment.