Release scripts: Minor fixes discovered during attempt for 3.5.0-alpha.0

This commit is contained in:
Piotr Tabor
2021-02-24 16:56:45 +00:00
parent db8c8c4246
commit c640957e2d
2 changed files with 7 additions and 4 deletions

View File

@@ -201,7 +201,7 @@ function modules_exp() {
# (unless the set is limited using ${PKG} or / ${USERMOD})
function run_for_modules {
local pkg="${PKG:-./...}"
if [ -z "${USERMOD}" ]; then
if [ -z "${USERMOD:-}" ]; then
for m in $(module_dirs); do
run_for_module "${m}" "$@" "${pkg}" || return "$?"
done
@@ -355,7 +355,9 @@ function assert_no_git_modifications {
# - no differencing commits in relation to the origin/$branch
function git_assert_branch_in_sync {
local branch
branch=$(git branch --show-current)
branch=$(run git rev-parse --abbrev-ref HEAD)
# TODO: When git 2.22 popular, change to:
# branch=$(git branch --show-current)
if [[ $(run git status --porcelain --untracked-files=no) ]]; then
log_error "The workspace in '$(pwd)' for branch: ${branch} has uncommitted changes"
log_error "Consider cleaning up / renaming this directory or (cd $(pwd) && git reset --hard)"