Kelvin Zhang | d64c883 | 2022-04-02 19:56:24 +0800 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Copyright (c) 2021-2022 Amlogic, Inc. All rights reserved. |
| 4 | # |
| 5 | # SPDX-License-Identifier: MIT |
| 6 | # |
| 7 | |
| 8 | #!/bin/bash |
| 9 | # |
| 10 | # Copyright (c) 2021-2022 Amlogic, Inc. All rights reserved. |
| 11 | # |
| 12 | # SPDX-License-Identifier: MIT |
| 13 | # |
| 14 | |
| 15 | ./scripts/publish.sh |
| 16 | |
| 17 | if [[ "$SUBMIT_TYPE" == "daily" ]] || [[ "$SUBMIT_TYPE" == "release" ]]; then |
| 18 | make docs |
| 19 | if [ -d $LOCAL_DOC_PATH ]; then |
| 20 | pushd $LOCAL_DOC_PATH >/dev/null |
| 21 | publish_docoment |
| 22 | if [ $? -ne 0 ]; then |
| 23 | echo "Failed to update document" |
| 24 | else |
| 25 | echo "Document updated!" |
| 26 | fi |
| 27 | popd >/dev/null |
| 28 | else |
| 29 | echo "$LOCAL_DOC_PATH not exist!" |
| 30 | fi |
| 31 | fi |
| 32 | |
| 33 | # Manually cherry pick patches |
| 34 | ./scripts/cherry_pick.sh |
| 35 | |
| 36 | source scripts/gen_package_combination.sh |
| 37 | |
| 38 | index=0 |
| 39 | while IFS= read -r LINE; do |
| 40 | source scripts/pkg_env.sh $index gen_all |
| 41 | [ "$?" -ne 0 ] && echo "Ignore unsupported combination!" && continue |
| 42 | make package |
| 43 | [ "$?" -ne 0 ] && echo "Failed to make!" && exit 3 |
| 44 | if [[ "$SUBMIT_TYPE" == "release" ]]; then |
| 45 | publish_package |
| 46 | [ "$?" -ne 0 ] && echo "Failed to source scripts/scp.sh!" && exit 4 |
| 47 | fi |
| 48 | index=$((index + 1)) |
| 49 | done <"$PACKAGE_COMBINATION" |
| 50 | |
| 51 | echo "Build completed!" |