3737# pr: output test.zip to workspace dir
3838# others: Rename the zip package name yourself, But need copy it to workspace dir
3939# #################################
40+ export PATH=$PATH :/opt/homebrew/bin
4041
4142echo Package_Publish: $Package_Publish
4243echo is_tag_fetch: $is_tag_fetch
6869
6970 rm -rf ./$unzip_name /rtc/bin
7071 rm -rf ./$unzip_name /rtc/demo
71- rm ./$unzip_name /rtc/ commits
72- rm ./$unzip_name /rtc/package_size_report.txt
72+ rm -f ./$unzip_name /. commits
73+ rm -f ./$unzip_name /spec
7374 rm -rf ./$unzip_name /pom
7475fi
75- mkdir -p ./$unzip_name /rtc/samples
76- cp -rf ./Android/${android_direction} ./$unzip_name /rtc/samples/API-Example || exit 1
76+
77+ mkdir -p ./$unzip_name /rtc/samples/API-Example || exit 1
78+
79+ if [ -d " ./Android/${android_direction} " ]; then
80+ cp -rf ./Android/${android_direction} /* ./$unzip_name /rtc/samples/API-Example/ || exit 1
81+ else
82+ echo " Error: Source directory ./Android/${android_direction} does not exist"
83+ exit 1
84+ fi
85+
77867za a -tzip result.zip -r $unzip_name > log.txt
7887mv result.zip $WORKSPACE /withAPIExample_${BUILD_NUMBER} _$zip_name
7988
89+ if [ $compress_apiexample = true ]; then
90+ 7za a -tzip result_onlyAPIExample.zip -r ./$unzip_name /rtc/samples/API-Example >> log.txt
91+ mv result_onlyAPIExample.zip $WORKSPACE /onlyAPIExample_${BUILD_NUMBER} _$zip_name
92+ fi
93+
8094if [ $compile_project = true ]; then
81- # install android sdk
82- which java
83- java --version
84- source ~ /.bashrc
85- export ANDROID_HOME=/usr/lib/android_sdk
86- echo ANDROID_HOME: $ANDROID_HOME
8795 cd ./$unzip_name /rtc/samples/API-Example || exit 1
8896 if [ -z " $sdk_url " ] || [ " $sdk_url " = " none" ]; then
8997 ./cloud_build.sh false || exit 1
@@ -92,4 +100,3 @@ if [ $compile_project = true ]; then
92100 fi
93101fi
94102
95-
0 commit comments