-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ISSUE #431]🔨Add rocketmq rust crate package and publish scripts🔨
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |