From 56819ebe1e087629a0b86bd8683c327250ccc9a4 Mon Sep 17 00:00:00 2001 From: Eric Fu Date: Mon, 2 Oct 2023 12:17:18 +0800 Subject: [PATCH 1/2] chore: risedev clean java targets --- Makefile.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile.toml b/Makefile.toml index ea862c94160a3..444b5f56fd52b 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -467,6 +467,15 @@ script = ''' #!/usr/bin/env bash set -e cargo clean + +if command -v mvn &> /dev/null; then + MAVEN_PATH="$(command -v mvn)" +else + MAVEN_PATH="${PREFIX_BIN}/maven/bin/mvn" +fi + +cd "${JAVA_DIR}" +"${MAVEN_PATH}" clean ''' [tasks.build-docs] From 3fca25518501fa4f34118fec6c9f30980bb9922e Mon Sep 17 00:00:00 2001 From: Eric Fu Date: Thu, 5 Oct 2023 17:19:16 +0800 Subject: [PATCH 2/2] improve --- Makefile.toml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Makefile.toml b/Makefile.toml index 444b5f56fd52b..a0c6213a63c82 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -461,12 +461,28 @@ cargo build -p risingwave_cmd_all \ [tasks.clean] private = true category = "RiseDev - Build" +description = "Clean all build targets" +dependencies = ["clean-rust", "clean-java"] + +[tasks.clean-rust] +private = true +category = "RiseDev - Build" description = "Clean Rust targets" condition = { env_set = ["ENABLE_BUILD_RUST"] } script = ''' #!/usr/bin/env bash set -e cargo clean +''' + +[tasks.clean-java] +private = true +category = "RiseDev - Build" +description = "Clean Rust targets" +condition = { env_set = ["ENABLE_RW_CONNECTOR", "ENABLE_BUILD_RW_CONNECTOR"] } +script = ''' +#!/usr/bin/env bash +set -e if command -v mvn &> /dev/null; then MAVEN_PATH="$(command -v mvn)"