btrfs-progs: ci: fix parameter parsing in image running scripts
There's an unconditional 'shift' in the scripts that will lead to an error "cannot shift" and this would fail inside CI. We want an implicit run on current HEAD so shift only when there are more parameters. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
9d3217b215
commit
cb0bf52edc
|
@ -16,7 +16,9 @@ fi
|
||||||
|
|
||||||
CIIMAGEDIR=ci/images/ci-centos-7-x86_64
|
CIIMAGEDIR=ci/images/ci-centos-7-x86_64
|
||||||
BRANCH=${1:-HEAD}
|
BRANCH=${1:-HEAD}
|
||||||
shift
|
if [ "$#" -ge 1 ]; then
|
||||||
|
shift
|
||||||
|
fi
|
||||||
HASH=$(git log -1 --format='%h %s' "$BRANCH")
|
HASH=$(git log -1 --format='%h %s' "$BRANCH")
|
||||||
|
|
||||||
echo "CI: Generate archive from $BRANCH ($HASH)"
|
echo "CI: Generate archive from $BRANCH ($HASH)"
|
||||||
|
|
|
@ -16,7 +16,9 @@ fi
|
||||||
|
|
||||||
CIIMAGEDIR=ci/images/ci-centos-8-x86_64
|
CIIMAGEDIR=ci/images/ci-centos-8-x86_64
|
||||||
BRANCH=${1:-HEAD}
|
BRANCH=${1:-HEAD}
|
||||||
shift
|
if [ "$#" -ge 1 ]; then
|
||||||
|
shift
|
||||||
|
fi
|
||||||
HASH=$(git log -1 --format='%h %s' "$BRANCH")
|
HASH=$(git log -1 --format='%h %s' "$BRANCH")
|
||||||
|
|
||||||
echo "CI: Generate archive from $BRANCH ($HASH)"
|
echo "CI: Generate archive from $BRANCH ($HASH)"
|
||||||
|
|
|
@ -16,7 +16,9 @@ fi
|
||||||
|
|
||||||
CIIMAGEDIR=ci/images/ci-openSUSE-Leap-15.3-x86_64
|
CIIMAGEDIR=ci/images/ci-openSUSE-Leap-15.3-x86_64
|
||||||
BRANCH=${1:-HEAD}
|
BRANCH=${1:-HEAD}
|
||||||
shift
|
if [ "$#" -ge 1 ]; then
|
||||||
|
shift
|
||||||
|
fi
|
||||||
HASH=$(git log -1 --format='%h %s' "$BRANCH")
|
HASH=$(git log -1 --format='%h %s' "$BRANCH")
|
||||||
|
|
||||||
echo "CI: Generate archive from $BRANCH ($HASH)"
|
echo "CI: Generate archive from $BRANCH ($HASH)"
|
||||||
|
|
|
@ -16,7 +16,9 @@ fi
|
||||||
|
|
||||||
CIIMAGEDIR=ci/images/ci-openSUSE-Leap-15.4-x86_64
|
CIIMAGEDIR=ci/images/ci-openSUSE-Leap-15.4-x86_64
|
||||||
BRANCH=${1:-HEAD}
|
BRANCH=${1:-HEAD}
|
||||||
shift
|
if [ "$#" -ge 1 ]; then
|
||||||
|
shift
|
||||||
|
fi
|
||||||
HASH=$(git log -1 --format='%h %s' "$BRANCH")
|
HASH=$(git log -1 --format='%h %s' "$BRANCH")
|
||||||
|
|
||||||
echo "CI: Generate archive from $BRANCH ($HASH)"
|
echo "CI: Generate archive from $BRANCH ($HASH)"
|
||||||
|
|
|
@ -16,7 +16,9 @@ fi
|
||||||
|
|
||||||
CIIMAGEDIR=ci/images/ci-musl-x86_64
|
CIIMAGEDIR=ci/images/ci-musl-x86_64
|
||||||
BRANCH=${1:-HEAD}
|
BRANCH=${1:-HEAD}
|
||||||
shift
|
if [ "$#" -ge 1 ]; then
|
||||||
|
shift
|
||||||
|
fi
|
||||||
HASH=$(git log -1 --format='%h %s' "$BRANCH")
|
HASH=$(git log -1 --format='%h %s' "$BRANCH")
|
||||||
|
|
||||||
echo "CI: Generate archive from $BRANCH ($HASH)"
|
echo "CI: Generate archive from $BRANCH ($HASH)"
|
||||||
|
|
|
@ -16,7 +16,9 @@ fi
|
||||||
|
|
||||||
CIIMAGEDIR=ci/images/ci-openSUSE-tumbleweed-x86_64
|
CIIMAGEDIR=ci/images/ci-openSUSE-tumbleweed-x86_64
|
||||||
BRANCH=${1:-HEAD}
|
BRANCH=${1:-HEAD}
|
||||||
shift
|
if [ "$#" -ge 1 ]; then
|
||||||
|
shift
|
||||||
|
fi
|
||||||
HASH=$(git log -1 --format='%h %s' "$BRANCH")
|
HASH=$(git log -1 --format='%h %s' "$BRANCH")
|
||||||
|
|
||||||
echo "CI: Generate archive from $BRANCH ($HASH)"
|
echo "CI: Generate archive from $BRANCH ($HASH)"
|
||||||
|
|
Loading…
Reference in New Issue