diff --git a/Justfile b/Justfile index c3fdd0b..5ae8c50 100644 --- a/Justfile +++ b/Justfile @@ -1,9 +1,15 @@ # nu_plugin_audio justfile +set shell := ["nu", "-c"] # list available recipes default: @just --list +# verify if just is using nushell +test-shell: + @echo $"Shell is (if ($nu != null) { 'Nushell' } else { 'Unknown' })" + @echo $"Version: (version | get version)" + # check formatting and clippy (run 'just fix' to auto-fix) check: -cargo fmt --check @@ -56,6 +62,15 @@ release-dry: # publish release to crates.io and push tag to github release: - cargo smart-release --update-crates-index --execute --changelog-without commit-statistics --no-tag - git tag v$(cargo pkgid | cut -d# -f2) - git push origin v$(cargo pkgid | cut -d# -f2) + @echo "Ensuring cargo-dist is in sync..." + dist init --yes + if (git status --porcelain .github/workflows/release.yml dist-workspace.toml | is-empty) == false { \ + echo "Error: cargo-dist files were out of sync and have been updated."; \ + echo "Please commit these changes before running 'just release' again."; \ + exit 1; \ + }; \ + cargo smart-release --update-crates-index --execute --changelog-without commit-statistics --no-tag; \ + let version = (cargo pkgid | str replace -r '.*#' '' | str replace -r '.*:' ''); \ + git tag $"v($version)" -m $"Release v($version)"; \ + git push origin main; \ + git push origin $"v($version)" diff --git a/src/audio_meta.rs b/src/audio_meta.rs index 1fe27ca..f2625e7 100644 --- a/src/audio_meta.rs +++ b/src/audio_meta.rs @@ -70,11 +70,10 @@ impl SimplePluginCommand for SoundMetaGetCmd { fn signature(&self) -> Signature { Signature::new("sound meta") .input_output_types(vec![ - (Type::Nothing, Type::Record(vec![].into())), - (Type::Binary, Type::Record(vec![].into())), + (Type::Any, Type::Record(vec![].into())), ]) .switch("all", "List all possible frame names", Some('a')) - .optional("File Path", SyntaxShape::Filepath, "file to play") + .optional("File Path", SyntaxShape::Filepath, "file to read") .category(Category::Experimental) }