Skip to content

Commit

Permalink
Let the release phase verify that any submodules have been released.
Browse files Browse the repository at this point in the history
Detect the case when a release is being created from submodules that are not
released.

Signed-off-by: Dean Roehrich <[email protected]>
  • Loading branch information
roehrich-hpe committed Jul 16, 2024
1 parent de232cb commit 0d10847
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tools/release-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,20 @@ verify_clean_workarea() {
fi
}

verify_clean_submodule_release_workarea() {
local indent="$1"

if [[ -f .gitmodules ]]; then
if [[ $(git status -s | wc -l) -gt 0 ]]; then
msg "${indent}Submodule status"
git submodule status
if [[ $(git submodule status | grep -cE '^\+') -gt 0 ]]; then
do_fail "${indent}Has the submodule been released yet?"
fi
fi
fi
}

get_default_branch() {
local repo_short_name="$1"
local default_branch=master
Expand Down Expand Up @@ -658,6 +672,7 @@ check_repo_release_vX() {
fi
fi

verify_clean_submodule_release_workarea "$indent"
verify_clean_workarea "$indent"

update_nnf_mfu_release_references "$repo_short_name" "$indent"
Expand Down

0 comments on commit 0d10847

Please sign in to comment.