-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild-toolchains-manual.sh
executable file
·64 lines (56 loc) · 1.95 KB
/
build-toolchains-manual.sh
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash -e
###############################################################################
# GitHub Actions time out after 6 hours. That tends to not be long enough to #
# build certain toolchains. #
# #
# To build and push them manually, uncomment the desired toolchains below and #
# run the script. #
###############################################################################
languages=(
#node:linux-arm:8
#node:linux-arm:10
node:linux-arm:12
node:linux-arm:14
#node:linux-arm64:8
#node:linux-arm64:10
#node:linux-arm64:12
#node:linux-arm64:14
#node:linux-x64:8
#node:linux-x64:10
#node:linux-x64:12
#node:linux-x64:14
#python:linux-arm:3.5.10
#python:linux-arm:3.6.12
#python:linux-arm:3.7.9
#python:linux-arm:3.8.6
#python:linux-arm:3.9.0
#python:linux-arm64:3.5.10
#python:linux-arm64:3.6.12
#python:linux-arm64:3.7.9
#python:linux-arm64:3.8.6
#python:linux-arm64:3.9.0
#python:linux-x64:3.5.10
#python:linux-x64:3.6.12
#python:linux-x64:3.7.9
#python:linux-x64:3.8.6
#python:linux-x64:3.9.0
)
for lang in ${languages[@]}; do
language=$(echo "$lang" | cut -d: -f1)
architecture=$(echo "$lang" | cut -d: -f2)
version=$(echo "$lang" | cut -d: -f3)
short_version=$(echo "$version" | cut -d. -f 1-2)
for toolchain in toolchain/$architecture; do
image=$(echo "$toolchain" | sed 's/\//-/g')
image=${image}-${language}-${short_version}
echo "Building: $image"
if [ $language = node ]; then
docker build --build-arg NODE_VERSION=${version} -t ${image} ${toolchain}/${language}
else
docker build --build-arg PYTHON_VERSION=${version} -t ${image} ${toolchain}/${language}
fi
docker tag ${image} webthingsio/${image}:latest
docker push webthingsio/${image}:latest
echo
done
done