-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[olm] Include script to generate olm bindata
- Loading branch information
1 parent
ad071c1
commit d59940c
Showing
12 changed files
with
350 additions
and
312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
entries: | ||
- description: > | ||
Added bindata for specific version of olm manifests. If the olm manifests for version specified in install | ||
command are available as bindata locally, we not longer fetch them from github. | ||
kind: "addition" | ||
breaking: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
function get_olm_manifests() { | ||
mkdir olm-manifests | ||
echo "downloading olm manifests for version ${1}" | ||
wget -O olm-manifests/olm.yaml "https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${1}/olm.yaml" | ||
wget -O olm-manifests/crds.yaml "https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${1}/crds.yaml" | ||
} | ||
|
||
function remove_olm_manifests { | ||
rm -rf olm-manifests | ||
} | ||
|
||
# check for files starting with the name "olm-bindata" inside internal/olm folder | ||
function delete_old_olmbindata { | ||
echo "Deleting previous versions of olm-bindata files if they exist" | ||
find internal/bindata/olmbindata -maxdepth 1 -type f -name olm_bindata-* -exec rm {} \; | ||
} | ||
|
||
# TODO: | ||
# 1. Modify this to accept multiple versions and download bindata. | ||
# 2. Discuss on the number of olm versions of will be supported. | ||
FILE=internal/bindata/olmbindata/"olm_bindata-"$1.go | ||
if [ -f "$FILE" ]; then | ||
delete_old_olmbindata | ||
get_olm_manifests $1 | ||
|
||
go get -u github.com/go-bindata/go-bindata/... | ||
$(go env GOPATH)/bin/go-bindata -o olm_bindata-$1.go -pkg olmbindata olm-manifests/ | ||
mv olm_bindata-$1.go internal/bindata/olmbindata | ||
|
||
remove_olm_manifests | ||
fi | ||
|
||
go mod tidy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.