release.sh: don't throw github release creation error on dry run

Signed-off-by: Filipe Laíns <lains@archlinux.org>
This commit is contained in:
Filipe Laíns 2020-03-16 21:01:13 +00:00 committed by Filipe Laíns
parent b2f3b56c31
commit 79be4b20d7
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ EOF
} }
echo 'Creating github release...' echo 'Creating github release...'
[ -z "$DRY_RUN" ] && url=$(curl -X POST --data "$(body)" "https://api.github.com/repos/$repo/releases?access_token=$github_token" 2>/dev/null | jq -r .html_url) [ -z "$DRY_RUN" ] && url=$(curl -X POST --data "$(body)" "https://api.github.com/repos/$repo/releases?access_token=$github_token" 2>/dev/null | jq -r .html_url)
[ -z "$url" ] && echo -e '\nError: Failed to create a github release' && exit 1 [ -z "$DRY_RUN" ] && [ -z "$url" ] && echo -e '\nError: Failed to create a github release' && exit 1
[ -z "$DRY_RUN" ] && echo -e "\nRelease created: $url" [ -z "$DRY_RUN" ] && echo -e "\nRelease created: $url"