mirror of
https://github.com/ClementTsang/bottom.git
synced 2026-08-23 03:46:29 +00:00
other: move schema_gen script to scripts folder (#2183)
This commit is contained in:
@@ -79,8 +79,6 @@ jobs:
|
||||
|
||||
- name: Execute choco packaging script
|
||||
run: |
|
||||
# Do not include the tools folder
|
||||
rm -rf tools/
|
||||
python "./scripts/windows/choco/choco_packager.py" "./release/bottom_x86_64-pc-windows-msvc.zip" ${{ env.RELEASE_VERSION }} "./scripts/windows/choco/bottom.nuspec.template" "./scripts/windows/choco/chocolateyinstall.ps1.template" "bottom.nuspec" "tools/chocolateyinstall.ps1" "tools/"
|
||||
zip -r choco.zip "bottom.nuspec" "tools"
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ on:
|
||||
paths:
|
||||
- "schema/**"
|
||||
- "scripts/schema/**"
|
||||
- "tools/schema_gen/**"
|
||||
- "scripts/schema_gen/**"
|
||||
- ".github/workflows/validate_schema.yml"
|
||||
- "Cargo.toml"
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
uses: ClementTsang/skip-duplicate-actions@41b0a75f656d455934ffa6a46b779d8d996ac47c
|
||||
with:
|
||||
skip_after_successful_duplicate: "true"
|
||||
paths: '["schema/**", "scripts/schema/**", ".github/actions/**", ".github/ci/**", ".github/workflows/validate_schema.yml", "tools/schema_gen/**", "Cargo.toml"]'
|
||||
paths: '["schema/**", "scripts/schema/**", ".github/actions/**", ".github/ci/**", ".github/workflows/validate_schema.yml", "scripts/schema_gen/**", "Cargo.toml"]'
|
||||
do_not_skip: '["workflow_dispatch"]'
|
||||
|
||||
test-build-documentation:
|
||||
|
||||
Generated
+2
-2
@@ -1786,9 +1786,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "timeless"
|
||||
version = "0.0.1"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4cc3e5eaa88cd8a3e3cbfc3d3f2183252f8b65c40bc5dfe7bb7345c1de42e99e"
|
||||
checksum = "767209b4e74b65405f4d46898c1a4fb344fe0182becc4c3ebf647663d68884c9"
|
||||
|
||||
[[package]]
|
||||
name = "toml_datetime"
|
||||
|
||||
+1
-2
@@ -24,7 +24,6 @@ exclude = [
|
||||
"sample_configs/",
|
||||
"schema/",
|
||||
"scripts/",
|
||||
"tools/",
|
||||
"wix/",
|
||||
".all-contributorsrc",
|
||||
".gitignore",
|
||||
@@ -89,7 +88,7 @@ rustc-hash = "2.1.3"
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
starship-battery = { version = "0.11.1", optional = true }
|
||||
sysinfo = "=0.39.6"
|
||||
timeless = "0.0.1"
|
||||
timeless = "0.1.0"
|
||||
toml_edit = { version = "0.25.12", features = ["serde"] }
|
||||
unicode-ellipsis = "0.6.0"
|
||||
unicode-segmentation = "1.13.3"
|
||||
|
||||
+4
-4
@@ -4,18 +4,18 @@
|
||||
|
||||
These are automatically generated from the code using [`schemars`](https://github.com/GREsau/schemars). The `schemars`
|
||||
derives are locked behind the `generate_schema` feature flag to avoid building unnecessary code for normal builds.
|
||||
Meanwhile, the generator itself lives in a separate `tools/schema_gen` helper crate. You can
|
||||
Meanwhile, the generator itself lives in a separate `scripts/schema_gen` helper crate. You can
|
||||
generate them like so:
|
||||
|
||||
```bash
|
||||
# Will print out to stdout
|
||||
cargo run --manifest-path tools/schema_gen/Cargo.toml
|
||||
cargo run --manifest-path scripts/schema_gen/Cargo.toml
|
||||
|
||||
# e.g. for nightly
|
||||
cargo run --manifest-path tools/schema_gen/Cargo.toml > schema/nightly/bottom.json
|
||||
cargo run --manifest-path scripts/schema_gen/Cargo.toml > schema/nightly/bottom.json
|
||||
|
||||
# e.g. for a specific version
|
||||
cargo run --manifest-path tools/schema_gen/Cargo.toml -- 0.12.0 > schema/v0.12.0/bottom.json
|
||||
cargo run --manifest-path scripts/schema_gen/Cargo.toml -- 0.12.0 > schema/v0.12.0/bottom.json
|
||||
```
|
||||
|
||||
Alternatively, run the `scripts/schema/generate.sh` script (for stable releases) or `scripts/schema/nightly.sh`
|
||||
|
||||
@@ -6,4 +6,4 @@ cd "$(dirname "$0")";
|
||||
cd ../..
|
||||
|
||||
mkdir -p schema/v$1
|
||||
cargo run --manifest-path tools/schema_gen/Cargo.toml -- $1 > schema/v$1/bottom.json
|
||||
cargo run --manifest-path scripts/schema_gen/Cargo.toml -- $1 > schema/v$1/bottom.json
|
||||
|
||||
@@ -5,4 +5,4 @@ set -e
|
||||
cd "$(dirname "$0")";
|
||||
cd ../..
|
||||
|
||||
cargo run --manifest-path tools/schema_gen/Cargo.toml > schema/nightly/bottom.json
|
||||
cargo run --manifest-path scripts/schema_gen/Cargo.toml > schema/nightly/bottom.json
|
||||
|
||||
+2
-2
@@ -1577,9 +1577,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "timeless"
|
||||
version = "0.0.1"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4cc3e5eaa88cd8a3e3cbfc3d3f2183252f8b65c40bc5dfe7bb7345c1de42e99e"
|
||||
checksum = "767209b4e74b65405f4d46898c1a4fb344fe0182becc4c3ebf647663d68884c9"
|
||||
|
||||
[[package]]
|
||||
name = "toml_datetime"
|
||||
Reference in New Issue
Block a user