Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: reduce output, check gh login auth status only if not logged in #7282

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions scripts/release_prep.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
#!/bin/bash
set +x

set -x

# pre-requisites: install github CLI
# - github documentation: https://github.com/cli/cli#installation
# - github is remote 'origin'
# - PRs use test section LAST with heading "## Tests"
# - ALL build and release PRs start with "build: "

if ! command -v gh >/dev/null 2>&1; then
echo "Install gh first"
exit 1
fi

if ! gh auth status >/dev/null 2>&1; then
echo "You need to login: gh auth login"
exit 1
fi

has_local_changes=$(git status --porcelain --untracked-files=no --ignored=no)
if [[ ${has_local_changes} ]]; then
set +x
Expand Down Expand Up @@ -70,8 +80,6 @@ echo "## Dev-Dependencies" >> ${pr_body_file_groupped}
echo "" >> ${pr_body_file_groupped}
grep -E -- '- [a-z]+\(deps-dev\)' ${pr_body_file} >> ${pr_body_file_groupped}

gh auth login

## Extract test procedures for feature PRs
echo "" >> ${pr_body_file_groupped}
echo "## Tests" >> ${pr_body_file_groupped}
Expand Down
Loading