-
Notifications
You must be signed in to change notification settings - Fork 326
Fail Travis builds if Jekyll outputs empty files #538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Failed with the following empty files:
|
I like this idea. 👍 |
@@ -17,3 +17,5 @@ install: | |||
|
|||
script: | |||
- bundle exec jekyll build | |||
- find ./_site -empty ! -name error.log | |||
- find ./_site -empty ! -name error.log | read && false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to #537. Does the last line ever return true
?
true && false == false
and
false && false == false
Again I may be missing something here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I've changed it to ! read
d4425b0
to
0ed1df8
Compare
check out your travis logs https://travis-ci.org/scala/scala-lang/builds/176708368 |
5286c78
to
f36251a
Compare
It turns out these empty files output by Jekyll are empty purposefully. There should be even more caught by the find command, since there are many markdown files that contain only YAML front matter. Some of those files have an extra line after the front matter, so they aren't seen as empty. The find command could surface those with Paths that contain these purposeful empty files could be ignored. Currently, those paths are
The find command to ignore two paths is so unwieldily it's probably not worth mucking up the build process with it. So, I'm not sure how useful it is now. We should probably just see how #537 goes. |
why? |
Files with only front matter is how these sections of the site function: https://github.com/scala/scala-lang/blob/master/training/README.md It's not well documented, but this code is relevant I believe |
would adding |
Yes, but doesn't it require a lot of parens? This is what I had find ./_site \( -type d \( -name events -o -name training \) -prune -false \) -o \( -type f ! -name error.log -empty \) |
I am starting to think that some of these Travis checks should be pulled out into a Scala script. I am not a fan of using Bash and Unix commands if it is not immediately obvious what is going on. |
I agree, the shell code is ugly. Looks like a script was written in Ruby in the past https://github.com/scala/scala-lang/tree/master/_tools/validation Not sure if it's used or not, still. |
I don't think it is. I am actually working on a |
SGTM. I see no problem in taking on a Scala dependency. |
regardless, shall we merge? (I suggest we do.) |
f36251a
to
0b98cd2
Compare
Sure. 👍 |
While reading #516, it seemed to me that checking for empty files might be useful.
Turns out it is.