-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.sh
48 lines (46 loc) · 1.1 KB
/
variables.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
#!/bin/bash -e
while [[ $# -gt 0 ]]; do
case "$1" in
--container-repo=*)
container_repo="${1#*=}"
;;
--container-name=*)
container_name="${1#*=}"
;;
--go-version=*)
go_version="${1#*=}"
;;
--protoc-version=*)
protoc_version="${1#*=}"
;;
--protoc-gen-go-version=*)
protoc_gen_go_version="${1#*=}"
;;
--protoc-gen-go-grpc-version=*)
protoc_gen_go_grpc_version="${1#*=}"
;;
--debian-version=*)
debian_version="${1#*=}"
;;
--platform=*)
platform="${1#*=}"
;;
--version=*)
version="${1#*=}"
;;
*)
echo "invalid option: $1"
exit 1
;;
esac
shift
done
container_repo="${container_repo:-nomionz}"
container_name="${container_name:-go-protoc}"
go_version="${go_version:-1.22.0}"
protoc_version="${protoc_version:-26.1}"
protoc_gen_go_version="${protoc_gen_go_version:-1.33}"
protoc_gen_go_grpc_version="${protoc_gen_go_grpc_version:-1.3}"
debian_version="${debian_version:-bullseye}"
platform="${platform:-x86_64}"
version="${version:-${protoc_gen_go_version}}"