-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
I am not sure why Travis was running here. I've turned it off for future pushes. |
@@ -0,0 +1,44 @@ | |||
# Build resources | |||
|
|||
The resources in this folder are used for building WHATWG specifications. |
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.
standards (throughout)
The `deploy.sh` script is used by most WHATWG specifications and is meant to run either on Travis CI, or locally with the `--local` command-line flag for preview purposes. It performs the following steps: | ||
|
||
- Running [Bikeshed](https://github.com/tabatkins/bikeshed), through its [web API](https://api.csswg.org/bikeshed/), to produce: | ||
- If on master, the built living standard, as well as a commit snapshot |
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.
Living Standard*
Similarly, a local deploy can be performed with | ||
|
||
```bash | ||
curl --remote-name --fail https://resources.whatwg.org/build/deploy.sh && bash ./deploy.sh --local |
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.
Should we instead turn this into "make localdeploy"? A bit more duplication perhaps, but also easier to use.
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.
That's what I did, see https://github.com/whatwg/url/pull/205/files#diff-b67911656ef5d18c4ae36cb6741b7965R7 . But the idea is that this repo is just documenting how to use deploy.sh. If your consumer repo wants to use it via a Makefile it can.
Unless you think we should host the makefiles here too somehow?
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.
Okay, I was a little unclear who these instructions are for, but this probably is the right tradeoff for now. We can't deduplicate Makefile as far as I know.
/usr/lib/jvm/java-8-oracle/jre/bin/java -jar vnu.jar --skip-non-html $WEB_ROOT | ||
fi | ||
|
||
if [ "$1" != "--local" ]; then |
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.
Can this not be combined with the previous if?
curl https://api.csswg.org/bikeshed/ -f -F file=@$INPUT_FILE \ | ||
-F md-Text-Macro="SNAPSHOT-LINK $SNAPSHOT_LINK" \ | ||
> $WEB_ROOT/index.html | ||
cp .htaccess $WEB_ROOT/.htaccess 2>/dev/null || : |
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.
What is this doing exactly?
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.
For whatwg/url in particular the .htaccess is actually important.
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.
This copies .htaccess
but ignores any errors. This was my best attempt at "copy .htaccess
if it exists, otherwise don't bother."
I guess maybe instead i should do the equivalent of if (htaccess exists) { copy it }
. The problem with that is that it's susceptible to race conditions where htaccess disappears or appears between the if and the copy. But that's not realistically a problem in this scenario so I guess it's fine.
If we have a repo with no other resources to test on then that might be better for first pass.
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.
We can do DOM.
I was thinking for this we might want something like COPY_FILES_LIVING_ONLY=".htaccess". And for other cases such as Encoding we could have COPY_FILES="*.txt". Although I guess Encoding got even more complicated now it wants to run scripts.
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.
Yeah, that is exactly what I was thinking.
OK, updated. No |
@@ -17,27 +17,27 @@ BRANCHES_DIR="branch-snapshots" | |||
SERVER="75.119.197.251" | |||
SERVER_PUBLIC_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDM6WJlvCc/+Zy2wrdzfKMv0Mb2Pmf9INvJPOH/zFrG5TbrKWY2LbNB6m3kkYTDQJzc0EuxCytuDsGhTuzTgc3drHwe2dys7cUQyQzS0iue50r6nBMfr1x2h6WhV3OZHkzFgqS17vlVdlLcGHCCwYgm19TGlrqY5RDnE+jTEAC/9AN7YFbbyfZV5fzToXwA2sFyj9TtwKfu/EeZAInPBpaLumu/glhr+rFXwhQQdNFh7hth8b4flG5mOqODju94wtbuDa4Utw1+S/zCeFIU55R7JHa29Pz3rL6Rpiiin9SpenjkD3UpP+y8WC1OaMImEh1XNUuomQa+6qxXEjxQAW1r" | |||
|
|||
if [ "$1" != "--local" -a "$DEPLOY_USER" == "" ]; then | |||
echo "No deploy credentials present; skipping deploy" | |||
if [ "$TRAVIS" == "true" -a "$TRAVIS_PULL_REQUEST" == "true" ]; then |
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.
Note that in https://travis-ci.org/whatwg/whatwg.org/builds/194915312 it echoes "1" for TRAVIS_PULL_REQUEST. I do get "false" in https://travis-ci.org/whatwg/whatwg.org/builds/194915320. But maybe those are just all weird?
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.
Oh wow.
TRAVIS_PULL_REQUEST: The pull request number if the current job is a pull request, “false” if it’s not a pull request.
from https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
So the only applicable test is vs. "false"
LGTM to land this and see if that makes the DOM PR green. If that happens, LGTM to land that too. |
Closes whatwg/meta#6 and closes whatwg/meta#9.