Skip to content

Commit 65317cf

Browse files
authored
[ISSUE #431]🔨Add rocketmq rust crate package and publish scripts🔨 (#432)
1 parent 15959c5 commit 65317cf

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
@echo off
2+
setlocal
3+
4+
:: Save the current directory
5+
set CURRENT_DIR=%cd%
6+
7+
:: Navigate to the workspace root directory
8+
cd ..
9+
10+
echo Starting to package Rust workspace projects...
11+
12+
set PROJECTS=rocketmq-common rocketmq-runtime rocketmq-macros rocketmq rocketmq-filter rocketmq-store rocketmq-remoting rocketmq-cli rocketmq-namesrv rocketmq-broker
13+
14+
for %%P in (%PROJECTS%) do (
15+
echo Packaging %%P...
16+
cd %%P
17+
cargo package
18+
cargo publish
19+
if %errorlevel% neq 0 (
20+
echo %%P packaging failed.
21+
cd %CURRENT_DIR%
22+
exit /b %errorlevel%
23+
)
24+
cd ..
25+
)
26+
27+
echo Finished packaging projects.
28+
:: Return to the original directory
29+
cd %CURRENT_DIR%
30+
31+
endlocal
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
# Save the current directory
4+
CURRENT_DIR=$(pwd)
5+
6+
# Navigate to the workspace root directory
7+
cd ..
8+
9+
echo "Starting to package Rust workspace projects..."
10+
11+
PROJECTS=("rocketmq-common" "rocketmq-runtime" "rocketmq-macros" "rocketmq" "rocketmq-filter" "rocketmq-store" "rocketmq-remoting" "rocketmq-cli" "rocketmq-namesrv" "rocketmq-broker")
12+
13+
for PROJECT in "${PROJECTS[@]}"
14+
do
15+
echo "Packaging $PROJECT..."
16+
cd $PROJECT
17+
cargo package
18+
cargo publish
19+
if [ $? -ne 0 ]; then
20+
echo "$PROJECT packaging failed."
21+
cd $CURRENT_DIR
22+
exit 1
23+
fi
24+
cd ..
25+
done
26+
27+
echo "Finished packaging projects."
28+
# Return to the original directory
29+
cd $CURRENT_DIR

0 commit comments

Comments
 (0)