Skip to content
Snippets Groups Projects
Commit 20d5630a authored by Walter Lozano's avatar Walter Lozano Committed by Dylan Aïssi
Browse files

gitlab.sh: Use stderr to print errors


To follow good practices print errors to stderr, this is special important
on shell scripts since stdout is piped. While doing that fix typos in error
messages.

Signed-off-by: default avatarWalter Lozano <walter.lozano@collabora.com>
parent f0aadec0
No related branches found
No related tags found
1 merge request!230Improve gitlab.sh
......@@ -6,7 +6,7 @@ api(){
. ~/.gitlab-apertis-org-token
fi
[ -z "$CI_SERVER_HOST" ] && ( echo "No server host specified, use CI_SERVER_HOST env var to specify tit" >&2 ; exit 1 )
[ -z "$CI_SERVER_HOST" ] && (echo "No server host specified, use CI_SERVER_HOST env var to specify it" >&2 ; exit 1 )
api_base_url=https://gitlab.apertis.org/api/v4
api_endpoint=$1
......@@ -117,9 +117,9 @@ trigger-pipeline(){
set -e
usage () {
echo "Usage: $0 <package> <pipeline>"
echo ""
echo "Example: $0 libfoo debian/sid"
echo "Usage: trigger-pipeline <package> <pipeline>" >&2
echo "" >&2
echo "Example: trigger-pipeline libfoo debian/sid" >&2
}
if [ "$#" -ne 2 ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment