File tree Expand file tree Collapse file tree 2 files changed +19
-12
lines changed Expand file tree Collapse file tree 2 files changed +19
-12
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # This is a library which contains functions used inside ci/build
3
+ #
4
+ # We separated it into it's own file so that we could easily unit test
5
+ # these functions and helpers.
6
+ set -euo pipefai
7
+
8
+ # On some CPU architectures (notably node/uname "armv7l", default on Raspberry Pis),
9
+ # different package managers have different labels for the same CPU (deb=armhf, rpm=armhfp).
10
+ # This function parses arch-override.json and returns the overriden arch on platforms
11
+ # with alternate labels, or the same arch otherwise.
12
+ get_nfpm_arch () {
13
+ if jq -re " .${PKG_FORMAT} .${ARCH} " ./ci/build/arch-override.json > /dev/null; then
14
+ jq -re " .${PKG_FORMAT} .${ARCH} " ./ci/build/arch-override.json
15
+ else
16
+ echo " $ARCH "
17
+ fi
18
+ }
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ set -euo pipefail
7
7
main () {
8
8
cd " $( dirname " ${0} " ) /../.."
9
9
source ./ci/lib.sh
10
+ source ./ci/build/build-lib.sh
10
11
11
12
# Allow us to override architecture
12
13
# we use this for our Linux ARM64 cross compile builds
@@ -43,18 +44,6 @@ release_gcp() {
43
44
cp " ./release-packages/$release_name .tar.gz" " ./release-gcp/latest/$OS -$ARCH .tar.gz"
44
45
}
45
46
46
- # On some CPU architectures (notably node/uname "armv7l", default on Raspberry Pis),
47
- # different package managers have different labels for the same CPU (deb=armhf, rpm=armhfp).
48
- # This function parses arch-override.json and returns the overriden arch on platforms
49
- # with alternate labels, or the same arch otherwise.
50
- get_nfpm_arch () {
51
- if jq -re " .${PKG_FORMAT} .${ARCH} " ./ci/build/arch-override.json > /dev/null; then
52
- jq -re " .${PKG_FORMAT} .${ARCH} " ./ci/build/arch-override.json
53
- else
54
- echo " $ARCH "
55
- fi
56
- }
57
-
58
47
# Generates deb and rpm packages.
59
48
release_nfpm () {
60
49
local nfpm_config
You can’t perform that action at this time.
0 commit comments