Skip to content

Commit

Permalink
[ISSUE #431]🔨Add rocketmq rust crate package and publish scripts🔨
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsm committed Jun 5, 2024
1 parent 33bfcdc commit 32a2979
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
31 changes: 31 additions & 0 deletions distribution/package_publish_workspace.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@echo off
setlocal

:: Save the current directory
set CURRENT_DIR=%cd%

:: Navigate to the workspace root directory
cd ..

echo Starting to package Rust workspace projects...

set PROJECTS=rocketmq-common rocketmq-runtime rocketmq-macros rocketmq rocketmq-filter rocketmq-store rocketmq-remoting rocketmq-cli rocketmq-namesrv rocketmq-broker

for %%P in (%PROJECTS%) do (
echo Packaging %%P...
cd %%P
cargo package
cargo publish
if %errorlevel% neq 0 (
echo %%P packaging failed.
cd %CURRENT_DIR%
exit /b %errorlevel%
)
cd ..
)

echo Finished packaging projects.
:: Return to the original directory
cd %CURRENT_DIR%

endlocal
29 changes: 29 additions & 0 deletions distribution/package_publish_workspace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

# Save the current directory
CURRENT_DIR=$(pwd)

# Navigate to the workspace root directory
cd ..

echo "Starting to package Rust workspace projects..."

PROJECTS=("rocketmq-common" "rocketmq-runtime" "rocketmq-macros" "rocketmq" "rocketmq-filter" "rocketmq-store" "rocketmq-remoting" "rocketmq-cli" "rocketmq-namesrv" "rocketmq-broker")

for PROJECT in "${PROJECTS[@]}"
do
echo "Packaging $PROJECT..."
cd $PROJECT
cargo package
cargo publish
if [ $? -ne 0 ]; then
echo "$PROJECT packaging failed."
cd $CURRENT_DIR
exit 1
fi
cd ..
done

echo "Finished packaging projects."
# Return to the original directory
cd $CURRENT_DIR

0 comments on commit 32a2979

Please sign in to comment.