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