35 lines
977 B
Bash
Executable File
35 lines
977 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
set -u
|
|
# DEBUG
|
|
#set -x
|
|
|
|
main() {
|
|
|
|
#instances="$(ls -1 build__* \
|
|
# | grep -E 'instance|pilot' \
|
|
# | cut -d'_'
|
|
# )"
|
|
instances="$(find . -maxdepth 1 -type d \
|
|
| grep -E 'pilot|instance' \
|
|
| cut -d'_' -f3
|
|
)"
|
|
for i in ${instances}; do
|
|
dirs="$(find . -maxdepth 1 -type d \
|
|
| grep -E 'pilot|instance' \
|
|
| grep "${i}"
|
|
)"
|
|
echo "- ${i}"
|
|
for d in ${dirs}; do
|
|
cd ${d}
|
|
commit="$(git log --pretty=format:'%H' -n 1)"
|
|
cd - >/dev/null
|
|
d_name="$(basename "${d}")"
|
|
echo " - ${d_name}, commit: ${commit}"
|
|
done
|
|
done
|
|
}
|
|
|
|
main "${@}"
|