Browse code

fix tomlv because it doesn't read from stdin

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)

Jessica Frazelle authored on 2015/02/18 16:57:44
Showing 3 changed files
... ...
@@ -154,8 +154,11 @@ RUN set -x \
154 154
 	&& go install -v github.com/cpuguy83/go-md2man
155 155
 
156 156
 # install toml validator
157
-RUN git clone -b v0.1.0 https://github.com/BurntSushi/toml.git /go/src/github.com/BurntSushi/toml \
158
-    && go install -v github.com/BurntSushi/toml/cmd/tomlv
157
+ENV TOMLV_COMMIT 9baf8a8a9f2ed20a8e54160840c492f937eeaf9a
158
+RUN set -x \
159
+	&& git clone https://github.com/BurntSushi/toml.git /go/src/github.com/BurntSushi/toml \
160
+	&& (cd /go/src/github.com/BurntSushi/toml && git checkout -q $TOMLV_COMMIT) \
161
+	&& go install -v github.com/BurntSushi/toml/cmd/tomlv
159 162
 
160 163
 # Wrap all commands in the "docker-in-docker" script to allow nested containers
161 164
 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:"