-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-tag-and-push.sh
executable file
·50 lines (36 loc) · 1.9 KB
/
build-tag-and-push.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
#!/bin/bash
set -e
function teardown() {
popd >/dev/null 2>&1 || true
pushd "$(dirname -- "${BASH_SOURCE[0]}")" >/dev/null 2>&1
mv -fv ../Quake-WASM/WinQuake/net_websocket.c.bak ../Quake-WASM/WinQuake/net_websocket.c
mv -fv ../Quake-WASM/WinQuake/Makefile.emscripten.bak ../Quake-WASM/WinQuake/Makefile.emscripten
popd >/dev/null 2>&1 || true
}
trap teardown exit
pushd "$(dirname -- "${BASH_SOURCE[0]}")" >/dev/null 2>&1
cd ../
if ! test -e Quake-WASM; then
git clone https://github.com/initialed85/Quake-WASM
fi
if ! test -e Quake-LinuxUpdate; then
git clone https://github.com/initialed85/Quake-LinuxUpdate
fi
docker run --privileged --rm tonistiigi/binfmt --install all
cd ./quake-websocket-proxy
sed -i.bak s%ws://localhost:7071/ws%wss://quake-play.initialed85.cc/ws%g ../Quake-WASM/WinQuake/net_websocket.c
sed -i.bak s%ws://localhost:7071/ws%wss://quake-play.initialed85.cc/ws%g ../Quake-WASM/WinQuake/Makefile.emscripten
cd ../Quake-WASM
docker build --progress plain --platform=linux/amd64 -t kube-registry:5000/quake-wasm:latest -f ./Dockerfile .
docker build --progress plain --build-arg GLQUAKE=1 --platform=linux/amd64 -t kube-registry:5000/quake-wasm:latest-glquake -f ./Dockerfile .
cd ../Quake-LinuxUpdate
docker build --progress plain --platform=linux/i386 -t kube-registry:5000/quake-server:latest -f ./Dockerfile .
cd ../quake-websocket-proxy
docker build --progress plain --platform=linux/amd64 -t kube-registry:5000/quake-websocket-proxy:latest -f ./Dockerfile .
cd ./index
docker build --progress plain --platform=linux/amd64 -t kube-registry:5000/quake-index:latest -f ./Dockerfile .
docker image push kube-registry:5000/quake-wasm:latest
docker image push kube-registry:5000/quake-wasm:latest-glquake
docker image push kube-registry:5000/quake-server:latest
docker image push kube-registry:5000/quake-websocket-proxy:latest
docker image push kube-registry:5000/quake-index:latest