Skip to content

Commit

Permalink
add metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
francescobianco committed Jun 27, 2024
1 parent 6c64ab6 commit 5d78779
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/mush
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ main() {
eval "set -- --help"
fi

if [ "${1:0:1}" != "-" ] && command -v "mush-$1" >/dev/null 2>&1; then
"mush-$1" "$@"
exit $?
fi

eval "$(getoptions parser_definition parse "$0") exit 1"
parse "$@"
eval "set -- $REST"
Expand Down
12 changes: 12 additions & 0 deletions tests/bare/plugins/custom-command-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -e

echo "==> Build: mush"
cp target/release/mush target/release/mush.test.sh
bash target/release/mush.test.sh build --release

echo "==> Test: install basic-plugin"
cd tests/fixtures/basic-plugin
rm -fr bin lib libexec share target
bash ../../../target/release/mush -vvvvvvvvv install --path .
../../../target/release/mush basic-plugin
8 changes: 8 additions & 0 deletions tests/fixtures/basic-plugin/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ type = "plugin"
version = "0.1.0"
edition = "2022"

[[bin]]
name = "mush-plugin-command-1"
path = "src/main.rs"

[[bin]]
name = "mush-plugin-command-2"
path = "src/other_command/main.rs"

# See more keys and their definitions at https://mush.javanile.org/manifest.html

[dev-dependencies]

0 comments on commit 5d78779

Please sign in to comment.