Skip to content

Commit

Permalink
Unify branch names for odh-manifests and notebooks
Browse files Browse the repository at this point in the history
Notebooks branch can be set explicitly via --notebooks-branch

Signed-off-by: Andrej Podhradsky <apodhrad@redhat.com>
  • Loading branch information
apodhrad committed Nov 10, 2023
1 parent e9ef53e commit 6fdd1d0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@ To get help about the script
./rhods-disconnected-helper.sh -h
```

After running the script, the list of images with an example will be saved in a file by default called rhods-< version >.md with version the version of RHODS you are using.
After running the script, the list of images with an example will be saved in a file by default called rhods-< version >.md with version the version of RHODS you are using.

By default, the repositories for odh-manifests and notebooks are checked out to the same branch (rhods version). To use different notebooks branch, execute
```bash
./rhods-disconnected-helper.sh --rhods-version <version> --notebooks-branch <branch>
```
15 changes: 14 additions & 1 deletion rhods-disconnected-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set_defaults() {
rhods_version="${rhods_version:-}"
repository_folder="${repository_folder:-.odh-manifests}"
notebooks_folder="${notebooks_folder:-.odh-notebooks}"
notebooks_branch="${notebooks_branch:-release-2023a}"
notebooks_branch="${notebooks_branch:-}"
file_name="${file_name:-$rhods_version.md}"
skip_tls="${skip_tls:-false}"
mirror_url="${mirror_url:-registry.example.com:5000/mirror/oc-mirror-metadata}"
Expand All @@ -32,6 +32,7 @@ function help() {
echo " --set-registry Set the registry"
echo " --set-openshift-version Set the OpenShift version"
echo " --set-channel Set the channel"
echo " --notebooks-branch Set the notebooks branch"
}

function get_latest_rhods_version() {
Expand Down Expand Up @@ -186,6 +187,13 @@ function change_rhods_version() {
echo "Error: Version $rhods_version does not exist"
exit 1
fi

# Set the same version for notebooks if not set otherwise via
# --notebooks-branch <notebooks_branch>
if [ -z "${notebooks_branch}" ]; then
notebooks_branch="${rhods_version}"
fi

echo "Switching to $rhods_version"
git switch "$rhods_version"
return 0
Expand Down Expand Up @@ -244,6 +252,11 @@ parse_args() {
shift
shift
;;
--notebooks-branch)
notebooks_branch="$2"
shift
shift
;;
--skip-image-verification)
skip_image_verification=true
shift
Expand Down

0 comments on commit 6fdd1d0

Please sign in to comment.