File tree Expand file tree Collapse file tree 1 file changed +8
-18
lines changed Expand file tree Collapse file tree 1 file changed +8
-18
lines changed Original file line number Diff line number Diff line change @@ -138,25 +138,15 @@ esac
138
138
# ------------------------------------------------------- #
139
139
140
140
if [[ " $CMD " == " assemble" ]]; then
141
- artefact_name=" elasticsearch-php-${VERSION} "
142
141
echo -e " \033[34;1mINFO: copy artefacts\033[0m"
143
- rsync -arv --exclude=.ci --exclude=.git --filter=' :- .gitignore' " $PWD " " ${output_folder} /."
144
-
145
- echo -e " \033[34;1mINFO: rename artefacts\033[0m"
146
- mv -v " ${output_folder} /elasticsearch-php" " ${output_folder} /${artefact_name} "
147
-
148
- echo -e " \033[34;1mINFO: build artefacts\033[0m"
149
- cd ./.ci/output && tar -czvf ${artefact_name} .tar.gz " ${artefact_name} /." && cd -
150
-
151
- echo -e " \033[34;1mINFO: cleanup\033[0m"
152
- rm -Rf " ${output_folder} /${artefact_name} "
153
-
154
- echo -e " \033[34;1mINFO: validate artefact\033[0m"
155
- proof=` ls ${output_folder} `
156
-
157
- if [ $proof == " ${artefact_name} .tar.gz" ]; then
158
- echo -e " \033[32;1mTARGET: assemble - success: $artefact_name .tar.gz\033[0m"
159
- else
142
+ rsync -ar --exclude=.ci --exclude=.git --filter=' :- .gitignore' " $PWD " " ${output_folder} /."
143
+
144
+ if compgen -G " .ci/output/*" > /dev/null; then
145
+ cd $repo /.ci/output && tar -czf elasticsearch-php-$VERSION .tar.gz * && cd -
146
+ rm -Rf " ${repo} /.ci/output/elasticsearch-php"
147
+ echo -e " \033[32;1mTARGET: successfully assembled client v$VERSION \033[0m"
148
+ exit 0
149
+ else
160
150
echo -e " \033[31;1mTARGET: assemble failed, empty workspace!\033[0m"
161
151
exit 1
162
152
fi
You can’t perform that action at this time.
0 commit comments