Skip to content
This repository has been archived by the owner. It is now read-only.

Commit 7a7f054

Browse files
committed
Protect against branches named "." or "onbuild" in generate-stackbrew-library.sh
1 parent 940d1a7 commit 7a7f054

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

generate-stackbrew-library.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ url='git://github.com/docker-library/rails'
77

88
echo '# maintainer: InfoSiftr <[email protected]> (@infosiftr)'
99

10-
commit="$(git log -1 --format='format:%H' .)"
10+
commit="$(git log -1 --format='format:%H' -- .)"
1111
fullVersion="$(grep -m1 'ENV RAILS_VERSION ' Dockerfile | cut -d' ' -f3)"
1212

1313
versionAliases=()
@@ -22,6 +22,8 @@ for va in "${versionAliases[@]}"; do
2222
echo "$va: ${url}@${commit}"
2323
done
2424

25-
echo
26-
commit="$(git log -1 --format='format:%H' onbuild)"
27-
echo "onbuild: ${url}@${commit} onbuild"
25+
for variant in onbuild; do
26+
echo
27+
commit="$(git log -1 --format='format:%H' -- "$variant")"
28+
echo "$variant: ${url}@${commit} $variant"
29+
done

0 commit comments

Comments
 (0)