Skip to content

Commit 7870c61

Browse files
committed
chore(just): just build-plugins now first lists the plugins in the crates folder - no more need to declare a build task for a new plugin
1 parent b45f583 commit 7870c61

File tree

1 file changed

+19
-43
lines changed

1 file changed

+19
-43
lines changed

justfile

Lines changed: 19 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Show help
2+
default:
3+
@just --list
4+
15
# Build all crates with appropriate commands
26
build:
37
just build-repl-logic-guest
@@ -13,28 +17,20 @@ build-release:
1317
# Build all plugins in debug mode
1418
build-plugins:
1519
#!/usr/bin/env bash
16-
just --list|grep build-plugin-|awk '{print $1}'|grep -v release|xargs just
20+
just list-rust-plugins|xargs -I {} cargo component build -p {}
1721

1822
# Build all plugins in release mode
1923
build-plugins-release:
2024
#!/usr/bin/env bash
21-
just --list|grep build-plugin-|awk '{print $1}'|grep release|xargs just
25+
just list-rust-plugins|xargs -I {} cargo component build --release -p {}
2226

23-
# Build the plugin-weather component
24-
build-plugin-weather:
25-
cargo component build -p plugin-weather
27+
# Build a specific plugin
28+
build-plugin plugin:
29+
cargo component build -p {{plugin}}
2630

27-
# Build the plugin-weather component in release mode
28-
build-plugin-weather-release:
29-
cargo component build --release -p plugin-weather
30-
31-
# Build the plugin-cat component
32-
build-plugin-cat:
33-
cargo component build -p plugin-cat
34-
35-
# Build the plugin-cat component in release mode
36-
build-plugin-cat-release:
37-
cargo component build --release -p plugin-cat
31+
# Build a specific plugin in release mode
32+
build-plugin-release plugin:
33+
cargo component build --release -p {{plugin}}
3834

3935
# Build the pluginlab (normal Rust build)
4036
build-pluginlab:
@@ -52,30 +48,6 @@ publish-pluginlab:
5248
publish-pluginlab-dry-run:
5349
cargo publish --dry-run -p pluginlab
5450

55-
# Build the plugin-greet component
56-
build-plugin-echo:
57-
cargo component build -p plugin-echo
58-
59-
# Build the plugin-greet component in release mode
60-
build-plugin-echo-release:
61-
cargo component build --release -p plugin-echo
62-
63-
# Build the plugin-greet component
64-
build-plugin-greet:
65-
cargo component build -p plugin-greet
66-
67-
# Build the plugin-greet component in release mode
68-
build-plugin-greet-release:
69-
cargo component build --release -p plugin-greet
70-
71-
# Build the plugin-ls component
72-
build-plugin-ls:
73-
cargo component build -p plugin-ls
74-
75-
# Build the plugin-ls component in release mode
76-
build-plugin-ls-release:
77-
cargo component build --release -p plugin-ls
78-
7951
# Build the REPL logic guest as a component
8052
build-repl-logic-guest:
8153
cargo component build -p repl-logic-guest
@@ -89,10 +61,12 @@ clean:
8961
cargo clean
9062
cargo component clean
9163

92-
# Show help
93-
default:
94-
@just --list
64+
# List all the rust plugins
65+
list-rust-plugins:
66+
#!/usr/bin/env bash
67+
ls -1 crates|grep plugin-
9568

69+
# Run the tests for the pluginlab
9670
test:
9771
just build-repl-logic-guest
9872
just build-plugins
@@ -106,6 +80,7 @@ test-e2e-pluginlab:
10680
just prepare-fixtures
10781
cargo test -p pluginlab
10882

83+
# Run the e2e tests for the pluginlab with no capture
10984
test-e2e-pluginlab-nocapture:
11085
just build-repl-logic-guest
11186
just build-plugins
@@ -126,6 +101,7 @@ test-e2e-pluginlab-http-nocapture:
126101
just prepare-fixtures
127102
WASM_TARGET_DIR=https://topheman.github.io/webassembly-component-model-experiments/plugins cargo test -p pluginlab -- --nocapture
128103

104+
# Prepare the fixtures for the e2e tests
129105
prepare-fixtures:
130106
mkdir -p tmp/filesystem
131107
rm -rf tmp/filesystem/*

0 commit comments

Comments
 (0)