@@ -14,25 +14,37 @@ set -u
14
14
# See the License for the specific language governing permissions and
15
15
# limitations under the License.
16
16
17
- BUILD_ROOT=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) /.." && pwd -P)
17
+ BUILD_ROOT=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) /.." && pwd -P)
18
18
SHA256CMD=${SHA256CMD:- shasum -a 256}
19
19
20
20
DOCKERCMD=${DOCKERCMD:- docker}
21
21
22
22
export scriptdir
23
- scriptdir=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
23
+ scriptdir=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
24
24
export OUTPUT_DIR=${BUILD_ROOT} /_output
25
25
export WORK_DIR=${BUILD_ROOT} /.work
26
26
export CACHE_DIR=${BUILD_ROOT} /.cache
27
+ export GOOS
28
+ GOOS=$( go env GOOS)
29
+ export GOARCH
30
+ GOARCH=$( go env GOARCH)
31
+ DEFAULT_CSV_VERSION=" 4.18.0"
32
+ CSV_VERSION=" ${CSV_VERSION:- ${DEFAULT_CSV_VERSION} } "
33
+ SKIP_RANGE=" ${SKIP_RANGE:- " " } "
34
+ REPLACES_CSV_VERSION=" ${REPLACES_CSV_VERSION:- " " } "
35
+ LATEST_ROOK_IMAGE=" docker.io/rook/ceph:v1.15.0.369.g7822e6b19"
36
+ ROOK_IMAGE=${ROOK_IMAGE:- ${LATEST_ROOK_IMAGE} }
37
+ DEFAULT_BUNDLE_IMAGE=quay.io/ocs-dev/rook-ceph-operator-bundle:" ${VERSION} "
38
+ BUNDLE_IMAGE=" ${BUNDLE_IMAGE:- ${DEFAULT_BUNDLE_IMAGE} } "
27
39
28
40
function ver() {
29
41
local full_ver maj min bug build
30
- full_ver=" $1 " # functions should name input params for easier understanding
42
+ full_ver=" $1 " # functions should name input params for easier understanding
31
43
maj=" $( echo " ${full_ver} " | cut -f1 -d' .' ) " # when splitting a param, name the components for easier understanding
32
44
min=" $( echo " ${full_ver} " | cut -f2 -d' .' ) "
33
45
bug=" $( echo " ${full_ver} " | cut -f3 -d' .' ) "
34
46
build=" $( echo " ${full_ver} " | cut -f4 -d' .' ) "
35
- printf " %d%03d%03d%03d" " ${maj} " " ${min} " " ${bug} " " ${build} "
47
+ printf " %d%03d%03d%03d" " ${maj} " " ${min} " " ${bug} " " ${build} "
36
48
}
37
49
38
50
function check_git() {
@@ -42,7 +54,7 @@ function check_git() {
42
54
local gitversion
43
55
gitversion=$( git --version | cut -d" " -f3)
44
56
45
- if (( $(ver "${gitversion} ") > $(ver 2 .6 .6 ) && $(ver "${gitversion} ") < $(ver 2 .8 .3 ) )) ; then
57
+ if (( $(ver "${gitversion} ") > $(ver 2 .6 .6 ) && $(ver "${gitversion} ") < $(ver 2 .8 .3 )) ); then
46
58
echo WARN: you are running git version " ${gitversion} " which has a bug related to relative
47
59
echo WARN: submodule paths. Please consider upgrading to 2.8.3 or later
48
60
fi
0 commit comments