-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.local.amd64.sh
35 lines (28 loc) · 1.05 KB
/
build.local.amd64.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
#!/bin/bash
if [ ! -f "RELEASE" ]; then
echo "Error: RELEASE file not found"
exit 1
else
echo "Start building"
fi
version=$(cat RELEASE)
echo "Current version: $version"
# Log files for each job
ENGINE_LOG="./engine_build.log"
WEB_LOG="./web_build.log"
# Start to build web and log output
echo -e "\nStart to build web . . .\n"
(
cd web || exit
docker buildx create --use --name bun-builder --node bun-builder0 --driver docker-container --driver-opt image=moby/buildkit:v0.10.6
docker buildx build --platform linux/amd64 --tag ifelsedotone/asktube-web:latest . --load 2>&1 | tee "../$WEB_LOG"
) & # Run in background
# Start to build engine and log output
echo -e "\nStart to build engine . . .\n"
(
cd engine || exit
docker buildx create --use --name py3-builder --node py3-builder0 --driver docker-container --driver-opt image=moby/buildkit:v0.10.6
docker buildx build --platform linux/amd64 --tag ifelsedotone/asktube-engine:latest . --load 2>&1 | tee "../$ENGINE_LOG"
) & # Run in background
wait
echo "Both builds completed."