Browse code

Merge pull request #10872 from jfrazelle/ugh-tomlv

fix tomlv because it doesn't read from stdin

Alexander Morozov authored on 2015/02/20 13:31:34
Showing 3 changed files
... ...
@@ -151,8 +151,11 @@ RUN set -x \
151 151
 	&& go install -v github.com/cpuguy83/go-md2man
152 152
 
153 153
 # install toml validator
154
-RUN git clone -b v0.1.0 https://github.com/BurntSushi/toml.git /go/src/github.com/BurntSushi/toml \
155
-    && go install -v github.com/BurntSushi/toml/cmd/tomlv
154
+ENV TOMLV_COMMIT 9baf8a8a9f2ed20a8e54160840c492f937eeaf9a
155
+RUN set -x \
156
+	&& git clone https://github.com/BurntSushi/toml.git /go/src/github.com/BurntSushi/toml \
157
+	&& (cd /go/src/github.com/BurntSushi/toml && git checkout -q $TOMLV_COMMIT) \
158
+	&& go install -v github.com/BurntSushi/toml/cmd/tomlv
156 159
 
157 160
 # Wrap all commands in the "docker-in-docker" script to allow nested containers
158 161
 ENTRYPOINT ["hack/dind"]
... ...
@@ -12,9 +12,9 @@
12 12
 
13 13
 	[Rules.maintainers]
14 14
 
15
-	title = "What is a maintainer?"
15
+		title = "What is a maintainer?"
16 16
 
17
-	text = """
17
+		text = """
18 18
 There are different types of maintainers, with different responsibilities, but
19 19
 all maintainers have 3 things in common:
20 20
 
... ...
@@ -531,6 +531,11 @@ made through a pull request.
531 531
 	Email = "lk4d4@docker.com"
532 532
 	GitHub = "lk4d4"
533 533
 
534
+	[people.mary]
535
+	Name = "Mary Anthony"
536
+	Email = "mary.anthony@docker.com"
537
+	GitHub = "moxiegirl"
538
+
534 539
 	[people.shykes]
535 540
 	Name = "Solomon Hykes"
536 541
 	Email = "solomon@docker.com"
... ...
@@ -590,7 +595,3 @@ made through a pull request.
590 590
 	Name = "Vishnu Kannan"
591 591
 	Email = "vishnuk@google.com"
592 592
 	GitHub = "vishh"
593
-
594
-	[people.mary]
595
-	Name = "Mary Anthony"
596
-	Email = "mary.anthony@docker.com"
... ...
@@ -9,13 +9,13 @@ unset IFS
9 9
 badFiles=()
10 10
 for f in "${files[@]}"; do
11 11
 	# we use "git show" here to validate that what's committed is formatted
12
-	if [ "$(git show "$VALIDATE_HEAD:$f" | tomlv)" ]; then
12
+	if ! git show "$VALIDATE_HEAD:$f" | tomlv /proc/self/fd/0 ; then
13 13
 		badFiles+=( "$f" )
14 14
 	fi
15 15
 done
16 16
 
17 17
 if [ ${#badFiles[@]} -eq 0 ]; then
18
-	echo 'Congratulations!  All toml source files have valid syntax.'
18
+	echo 'Congratulations!  All toml source files changed here have valid syntax.'
19 19
 else
20 20
 	{
21 21
 		echo "These files are not valid toml:"