File: update-deps.sh

package info (click to toggle)
golang-github-openshift-api 4.0%2Bgit20190508.81d064c-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 14,040 kB
  • sloc: sh: 171; makefile: 32
file content (25 lines) | stat: -rwxr-xr-x 787 bytes parent folder | download
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
#!/bin/bash -e

readonly GLIDE_MINOR_VERSION="13"
readonly REQUIRED_GLIDE_VERSION="0.$GLIDE_MINOR_VERSION"

function verify_glide_version() {
	if ! command -v glide &> /dev/null; then
		echo "[FATAL] Glide was not found in \$PATH. Please install version ${REQUIRED_GLIDE_VERSION} or newer."
		exit 1
	fi

	local glide_version
	glide_version=($(glide --version))
	if ! echo "${glide_version[2]#v}" | awk -F. -v min=$GLIDE_MINOR_VERSION '{ exit $2 < min }'; then
		echo "Detected glide version: ${glide_version[*]}."
		echo "Please install Glide version ${REQUIRED_GLIDE_VERSION} or newer."
		exit 1
	fi
}

verify_glide_version

glide update --strip-vendor

find vendor/ -name *.proto | xargs sed -i '/k8s.io\/apiextensions-apiserver\/pkg\/apis\/apiextensions\/v1beta1\/generated.proto/d'