New gh command does not accept legacy --user argument
Change-Id: I2605f82d0547499652070e8a7135864ed5484cc5
diff --git a/jjb/shell/github-release.sh b/jjb/shell/github-release.sh
index 58164c4..b0004ff 100755
--- a/jjb/shell/github-release.sh
+++ b/jjb/shell/github-release.sh
@@ -188,14 +188,17 @@
gh)
declare -a cmd=()
+ ## [TODO] Refactor into a function accepting:
+ ## --create
+ ## --info
+ ## --upload
cmd+=("$gh_cmd")
# cmd+=('--verbose')
- cmd+=('release')
- cmd+=('create')
- cmd+=('--user' "$user")
+ cmd+=('release' 'create')
+ # cmd+=('--latest')
cmd+=('--repo' "$repo")
cmd+=('--title' "$name")
- cmd+=('--descripton' "$descr")
+ # cmd+=('--descripton' "$descr") # not supported
cmd+=('--discussion-category' "Announcements")
# cmd+=('--latest') - auto based on date & ver
cmd+=('--verify-tag')
@@ -395,7 +398,12 @@
# shellcheck disable=SC2194
case 'gh' in
gh)
- "$gh_cmd" release upload "$GIT_VERSION" "${to_release[@]}"
+ declare -a cmd=()
+ cmd+=("$gh_cmd")
+ cmd+=('release' 'upload')
+ cmd+=('--repo' "$GERRIT_PROJECT")
+ cmd+=("${to_release[@]}")
+ "${cmd[@]}"
;;
*)