Support alternative .drone.yml files

main
Clément FRÉVILLE 1 year ago
parent 44563b1c4e
commit ac6c4d62d4

@ -9,8 +9,6 @@ help() {
cat << EOF
$(basename $0) exécute une pipeline Drone locale dans VDN.
$(synopsis)
-h : affiche cette aide
--help : affiche l'aide de Drone
@ -29,7 +27,9 @@ Exemple :
EOF
}
for arg; do
dronefile='.drone.yml'
for (( i=1; i<=$#; i++ )); do
arg=${!i}
case "$arg" in
'-h')
help; exit
@ -37,10 +37,19 @@ for arg; do
--)
break
;;
-*)
((i++))
;;
*)
if [[ $i -gt 1 ]]; then
dronefile="$arg"
fi
;;
esac
done
test -f .drone.yml || error 'Aucun fichier drone.yml trouvé'
test -f "$dronefile" || error "Aucun fichier $dronefile trouvé"
vdn-set-network-dir docker

Loading…
Cancel
Save