forked from twang2218/gitlab-ce-zh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
versions.sh
41 lines (35 loc) · 946 Bytes
/
versions.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
#!/bin/bash
# Only keep latest 5 version branches
# Unless there is an extra version branch for testing, such as, '-rc'
# Zero-based array
export VERSIONS=(
10.6.6
10.7.7
10.8.7
11.0.5
11.1.4
)
export APPENDIX=(
'-ce.0'
'-ce.0'
'-ce.0'
'-ce.0'
'-ce.0'
)
export TEMPLATES=(
Dockerfile.tag.v10.1.template
Dockerfile.tag.v10.1.template
Dockerfile.tag.v10.1.template
Dockerfile.tag.v10.1.template
Dockerfile.tag.v10.1.template
)
export BRANCHES=($(for v in ${VERSIONS[@]}; do echo -n "${v%.*} "; done))
# should be as simple as $VERSION[-1], however, bash on Mac is old
# export VERSION_LATEST=${VERSIONS[-1]}
LATEST_INDEX=4
export VERSION_LATEST=${VERSIONS[$LATEST_INDEX]}
export BRANCHES_LATEST=${BRANCHES[$LATEST_INDEX]}
export APPENDIX_LATEST=${APPENDIX[$LATEST_INDEX]}
export RC_IMAGE_TAG=11.1.0-rc4.ce.0
export RC_COMMIT_UPSTREAM=v11.1.0-rc4
export RC_COMMIT_ZH=v11.1.0-rc6-zh