Skip to content

Commit

Permalink
Update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Mar 26, 2023
1 parent 235136a commit a2375ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ci/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ cd "$(dirname "$0")"/..
# shellcheck disable=SC2154
trap 's=$?; echo >&2 "$0: Error on line "${LINENO}": ${BASH_COMMAND}"; exit ${s}' ERR

bail() {
echo >&2 "error: $*"
exit 1
}

if [[ -z "${CI:-}" ]]; then
bail "this script is intended to call from release workflow on CI"
fi

git config user.name "Taiki Endo"
git config user.email "[email protected]"

Expand Down
1 change: 1 addition & 0 deletions tools/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ if gh release view "${tag}" &>/dev/null; then
bail "tag '${tag}' has already been created and pushed"
fi

# Make sure that the release was created from an allowed branch.
if ! git branch | grep -q '\* main$'; then
bail "current branch is not 'main'"
fi
Expand Down

0 comments on commit a2375ad

Please sign in to comment.