release: Allow re-tries of tagging and github releases

hub tool from github lets you show a particular tag that might exist in
the repostiory. Switching our tag checking logic to use that instead of
listing all tags and grepping for the one we want. For some reason the
existing grep logic always fails to return the right code and always
lands on the portion of the code to generate a new tag.

Fixes: #519
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
This commit is contained in:
Ganesh Maharaj Mahalingam 2019-05-16 13:36:50 -07:00
parent fab6527d59
commit 6e8350f71b

View File

@ -145,7 +145,7 @@ create_github_release() {
tag=${2:-}
[ -d "${repo_dir}" ] || die "No repository directory"
[ -n "${tag}" ] || die "No tag specified"
if ! "${hub_bin}" release | grep -q "^${tag}$"; then
if ! "${hub_bin}" release show "${tag}"; then
info "Creating Github release"
if [[ "$tag" =~ "-rc" ]]; then
rc_args="-p"