pkgs/woodpecker: add help function

This commit is contained in:
Dmitriy Pleshevskiy 2023-03-16 01:14:34 +03:00
parent 09bd9e8e9e
commit 16da0f0c65
Signed by: pleshevskiy
GPG key ID: 79C4487B44403985

View file

@ -3,14 +3,19 @@
# shellcheck shell=bash # shellcheck shell=bash
function help () {
echo "Regenerates packaging data for the woodpecker packages."
echo "Usage: $0 <rev>"
exit 1
}
if [ -n "$GITHUB_TOKEN" ]; then if [ -n "$GITHUB_TOKEN" ]; then
TOKEN_ARGS=(--header "Authorization: token $GITHUB_TOKEN") TOKEN_ARGS=(--header "Authorization: token $GITHUB_TOKEN")
fi fi
if [[ $# -gt 1 || $1 == -* ]]; then if [[ $# -gt 1 || $1 == -* ]]; then
echo "Regenerates packaging data for the woodpecker packages." help
echo "Usage: $0 <rev>"
exit 1
fi fi
set -x set -x
@ -21,7 +26,7 @@ version="$1"
set -euo pipefail set -euo pipefail
if [ -z "$version" ]; then if [ -z "$version" ]; then
echo "Usage: $0 <rev>" help
fi fi
# Woodpecker repository # Woodpecker repository