blob: 9a467ffe123fda66e38294bb3540d9327d6b34f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# no-shebang-needed-its-a-library
#
# Utility functions for packaging in travis CI
#
# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
#
# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud)
#shellcheck disable=SC2148
set -e
function detect_arch_from_commit {
case "${TRAVIS_COMMIT_MESSAGE}" in
"[Package AMD64"*)
export BUILD_ARCH="amd64"
;;
"[Package i386"*)
export BUILD_ARCH="i386"
;;
"[Package ALL"*)
export BUILD_ARCH="all"
;;
"[Package arm64"*)
export BUILD_ARCH="arm64"
;;
*)
echo "Unknown build architecture '${BUILD_ARCH}' provided"
exit 1
;;
esac
echo "Detected build architecture ${BUILD_ARCH}"
}
|