mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-02-22 12:42:28 +00:00
ci: make the rustfmt.sh script ash-compatible
This commit is contained in:
parent
44e2f0317c
commit
9e65540cd8
1 changed files with 10 additions and 4 deletions
|
@ -1,11 +1,17 @@
|
|||
#!/bin/bash
|
||||
#!/bin/busybox ash
|
||||
set -euo pipefail
|
||||
|
||||
rustfmt=${RUSTFMT:-rustfmt}
|
||||
version="$($rustfmt -V)"
|
||||
if [[ $version != *nightly* ]]; then
|
||||
rustfmt="$rustfmt +nightly"
|
||||
fi
|
||||
case "$version" in
|
||||
*nightly*)
|
||||
# all good, no additional flags required
|
||||
;;
|
||||
*)
|
||||
# assume we're using some sort of rustup setup
|
||||
rustfmt="$rustfmt +nightly"
|
||||
;;
|
||||
esac
|
||||
|
||||
return=0
|
||||
find "$(dirname "$0")" -name '*.rs' -type f | while read file; do
|
||||
|
|
Loading…
Add table
Reference in a new issue