mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #12719 from ptabor/20210224-release-scripts-fix
Release scripts: Minor fixes discovered during attempt for release 3.5.0-alpha.0
This commit is contained in:
commit
d4d2b80608
@ -68,7 +68,8 @@ function update_versions_cmd() {
|
||||
}
|
||||
|
||||
function get_gpg_key {
|
||||
keyid=$(gpg --list-keys --with-colons| awk -F: '/^pub:/ { print $5 }')
|
||||
gitemail=$(git config --get user.email)
|
||||
keyid=$(run gpg --list-keys --with-colons "${gitemail}" | awk -F: '/^pub:/ { print $5 }')
|
||||
if [[ -z "${keyid}" ]]; then
|
||||
log_error "Failed to load gpg key. Is gpg set up correctly for etcd releases?"
|
||||
return 2
|
||||
@ -124,4 +125,4 @@ if echo "$0" | grep -E "release_mod.sh$" >/dev/null; then
|
||||
log_info
|
||||
log_warning "WARNING: It was a DRY_RUN. No files were modified."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -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)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user