Permalink
Browse files

Meta: enable snapshots

  • Loading branch information...
annevk committed Jan 22, 2017
1 parent a948c38 commit d41d52c71f550e73459f2f974b5ab8d64ab13c73
Showing with 130 additions and 1,610 deletions.
  1. +4 −0 .gitignore
  2. +14 −0 .travis.yml
  3. +2 −2 Makefile
  4. +9 −3 README.md
  5. +99 −0 deploy.sh
  6. BIN deploy_key.enc
  7. +2 −0 xhr.bs
  8. +0 −1,605 xhr.html
View
@@ -0,0 +1,4 @@
/xhr.spec.whatwg.org/
deploy_key
deploy_key.pub
xhr.html
View
@@ -0,0 +1,14 @@
language: generic
env:
global:
- ENCRYPTION_LABEL="19c738b99574"
install:
- curl -O https://sideshowbarker.net/nightlies/jar/vnu.jar
script:
- bash ./deploy.sh
- /usr/lib/jvm/java-8-oracle/jre/bin/java -jar vnu.jar --skip-non-html /home/travis/build/whatwg/xhr
notifications:
email:
on_success: never
on_failure: always
View
@@ -1,5 +1,5 @@
local: xhr.bs
bikeshed
bikeshed spec xhr.bs xhr.html --md-Text-Macro="SNAPSHOT-LINK LOCAL COPY"
remote: xhr.bs
curl https://api.csswg.org/bikeshed/ -f -F file=@xhr.bs > xhr.html
curl https://api.csswg.org/bikeshed/ -f -F file=@xhr.bs > xhr.html -F md-Text-Macro="SNAPSHOT-LINK LOCAL COPY"
View
@@ -7,15 +7,15 @@ respect the [WHATWG Code of Conduct](https://wiki.whatwg.org/wiki/Code_of_Conduc
### Contribution opportunities
Folks notice minor and larger issues with the DOM Standard all the time and we'd love your help
fixing those. Pull requests for typographical and grammar errors are also most welcome.
We'd love your help fixing outstanding issues. Pull requests for typographical and grammar errors
are also most welcome.
We'd be happy to mentor you through this process. If you're interested and need help getting
started, leave a comment on the issue or ask around [on IRC](https://wiki.whatwg.org/wiki/IRC).
### Pull requests
In short, change `dom.bs` and submit your patch, with a
In short, change `xhr.bs` and submit your patch, with a
[good commit message](https://github.com/erlang/otp/wiki/Writing-good-commit-messages). Consider
reading through the [WHATWG FAQ](https://wiki.whatwg.org/wiki/FAQ) if you are new here.
@@ -26,6 +26,12 @@ If you want to preview the spec locally, you can either use a locally installed
[Bikeshed](https://github.com/tabatkins/bikeshed) by running `make` or use the HTTP API version by
running `make remote`.
If you want to do a complete "local deploy" including commit and/or branch snapshots, run
```
./deploy.sh --local
```
### Merge policy
If you can commit to this repository, see the
View
@@ -0,0 +1,99 @@
#!/bin/bash
set -e
DEPLOY_USER="annevankesteren"
TITLE="XMLHttpRequest Standard"
LS_URL="https://xhr.spec.whatwg.org/"
COMMIT_URL_BASE="https://github.com/whatwg/xhr/commit/"
BRANCH_URL_BASE="https://github.com/whatwg/xhr/tree/"
INPUT_FILE="xhr.bs"
WEB_ROOT="xhr.spec.whatwg.org"
COMMITS_DIR="commit-snapshots"
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"
exit 0
fi
if [ "$1" == "--local" ]; then
echo "Running a local deploy into $WEB_ROOT directory"
echo ""
fi
SHA="`git rev-parse HEAD`"
BRANCH="`git rev-parse --abbrev-ref HEAD`"
if [ "$BRANCH" == "HEAD" ]; then # Travis does this for some reason
BRANCH=$TRAVIS_BRANCH
fi
if [ "$BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" != "false" -a "$TRAVIS_PULL_REQUEST" != "" ]; then
echo "Skipping deploy for a pull request; the branch build will suffice"
exit 0
fi
BACK_TO_LS_LINK="<a href=\"/\" id=\"commit-snapshot-link\">Go to the living standard</a>"
SNAPSHOT_LINK="<a href=\"/commit-snapshots/$SHA/\" id=\"commit-snapshot-link\">Snapshot as of this commit</a>"
echo "Branch = $BRANCH"
echo "Commit = $SHA"
echo ""
rm -rf $WEB_ROOT || exit 0
# Commit snapshot
COMMIT_DIR=$WEB_ROOT/$COMMITS_DIR/$SHA
mkdir -p $COMMIT_DIR
curl https://api.csswg.org/bikeshed/ -f -F file=@$INPUT_FILE -F md-status=LS-COMMIT \
-F md-warning="Commit $SHA $COMMIT_URL_BASE$SHA replaced by $LS_URL" \
-F md-title="$TITLE (Commit Snapshot $SHA)" \
-F md-Text-Macro="SNAPSHOT-LINK $BACK_TO_LS_LINK" \
> $COMMIT_DIR/index.html;
cp *.js *.json $COMMIT_DIR/
echo "Commit snapshot output to $WEB_ROOT/$COMMITS_DIR/$SHA"
echo ""
if [ $BRANCH != "master" ] ; then
# Branch snapshot, if not master
BRANCH_DIR=$WEB_ROOT/$BRANCHES_DIR/$BRANCH
mkdir -p $BRANCH_DIR
curl https://api.csswg.org/bikeshed/ -f -F file=@$INPUT_FILE -F md-status=LS-BRANCH \
-F md-warning="Branch $BRANCH $BRANCH_URL_BASE$BRANCH replaced by $LS_URL" \
-F md-title="$TITLE (Branch Snapshot $BRANCH)" \
-F md-Text-Macro="SNAPSHOT-LINK $SNAPSHOT_LINK" \
> $BRANCH_DIR/index.html;
cp *.js *.json $COMMIT_DIR/
echo "Branch snapshot output to $WEB_ROOT/$BRANCHES_DIR/$BRANCH"
else
# Living standard, if master
curl https://api.csswg.org/bikeshed/ -f -F file=@$INPUT_FILE \
-F md-Text-Macro="SNAPSHOT-LINK $SNAPSHOT_LINK" \
> $WEB_ROOT/index.html
cp *.js *.json $COMMIT_DIR/
echo "Living standard output to $WEB_ROOT"
fi
echo ""
find $WEB_ROOT -print
echo ""
if [ "$1" != "--local" ]; then
# Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"
ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR}
ENCRYPTED_IV=${!ENCRYPTED_IV_VAR}
openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in deploy_key.enc -out deploy_key -d
chmod 600 deploy_key
eval `ssh-agent -s`
ssh-add deploy_key
# scp the output directory up
echo "$SERVER $SERVER_PUBLIC_KEY" > known_hosts
scp -r -o UserKnownHostsFile=known_hosts $WEB_ROOT $DEPLOY_USER@$SERVER:
fi
View
Binary file not shown.
View
2 xhr.bs
@@ -11,13 +11,15 @@ Boilerplate: omit feedback-header, omit conformance, omit index, omit idl-index
!Participate: <a href=https://github.com/whatwg/xhr>GitHub whatwg/xhr</a> (<a href=https://github.com/whatwg/xhr/issues/new>file an issue</a>, <a href=https://github.com/whatwg/xhr/issues>open issues</a>, <a href="https://www.w3.org/Bugs/Public/buglist.cgi?product=WebAppsWG&amp;component=XHR&amp;resolution=---">legacy open bugs</a>)
!Participate: <a href=https://wiki.whatwg.org/wiki/IRC>IRC: #whatwg on Freenode</a>
!Commits: <a href=https://github.com/whatwg/xhr/commits>GitHub whatwg/xhr/commits</a>
!Commits: [SNAPSHOT-LINK]
!Commits: <a href=https://twitter.com/xhrstandard>@xhrstandard</a>
!Tests: <a href=https://w3c-test.org/XMLHttpRequest/>XMLHttpRequest tests</a> are hosted in the <a href="https://github.com/w3c/web-platform-tests/">W3C Web platform testsuite</a> &mdash; contributions welcome!
!Translation (non-normative): <span title=Japanese><a href=https://triple-underscore.github.io/XHR-ja.html lang=ja hreflang=ja rel=alternate>日本語</a></span>
Translate IDs: enumdef-xmlhttprequestresponsetype xmlhttprequestresponsetype,dictdef-progresseventinit progresseventinit,typedefdef-formdataentryvalue formdataentryvalue
</pre>
<script src=https://resources.whatwg.org/file-issue.js async></script>
<script src=https://resources.whatwg.org/commit-snapshot-shortcut-key.js async></script>
<script src=annotate_spec.js async></script>
<script src=https://resources.whatwg.org/dfn.js defer></script>
Oops, something went wrong.

0 comments on commit d41d52c

Please sign in to comment.