From 9e5abc773e9ee8427bb5ad950c1d951846f54b98 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Sun, 15 Jan 2017 08:27:22 +0100 Subject: [PATCH 01/17] deduplication attempt --- .travis.yml | 12 ++++++------ deploy.sh | 21 ++++++++++----------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6e2a6a5e..6e7ede23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,12 @@ language: generic env: - global: - - ENCRYPTION_LABEL: "82f6fcb5a224" -addons: - apt: - packages: - - oracle-java8-set-default + - ENCRYPTION_LABEL="82f6fcb5a224" + - DEPLOY_USER="annevankesteren" + - TITLE="URL Standard" + - SHORTNAME="url" + - INPUT_FILE="url.bs" + install: - curl -O https://sideshowbarker.net/nightlies/jar/vnu.jar script: diff --git a/deploy.sh b/deploy.sh index 914d3101..c3ff0876 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,19 +1,17 @@ #!/bin/bash set -e -DEPLOY_USER="annevankesteren" - -TITLE="URL Standard" -LS_URL="https://url.spec.whatwg.org/" -COMMIT_URL_BASE="https://github.com/whatwg/url/commit/" -BRANCH_URL_BASE="https://github.com/whatwg/url/tree/" - +LS_URL="https://$SHORTNAME.spec.whatwg.org/" +COMMIT_URL_BASE="https://github.com/whatwg/$SHORTNAME/commit/" +BRANCH_URL_BASE="https://github.com/whatwg/$SHORTNAME/tree/" INPUT_FILE="url.bs" -SERVER="url.spec.whatwg.org" -WEB_ROOT="url.spec.whatwg.org" +WEB_ROOT="$SHORTNAME.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 @@ -89,6 +87,7 @@ if [ "$1" != "--local" ]; then eval `ssh-agent -s` ssh-add deploy_key - # scp the output directory up - scp -r -o StrictHostKeyChecking=no $WEB_ROOT $DEPLOY_USER@$SERVER: + + echo "$SERVER $SERVER_PUBLIC_KEY" > known_hosts + scp -r -o UserKnownHostsFile=known_hosts $WEB_ROOT $DEPLOY_USER@$SERVER: fi From 743d901ae674e7b43a072fc3d3402d6b59fb279a Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Sun, 15 Jan 2017 12:43:33 +0100 Subject: [PATCH 02/17] who knows --- .travis.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6e7ede23..6b5e5978 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,12 @@ language: generic env: - - ENCRYPTION_LABEL="82f6fcb5a224" - - DEPLOY_USER="annevankesteren" - - TITLE="URL Standard" - - SHORTNAME="url" - - INPUT_FILE="url.bs" + global: + - ENCRYPTION_LABEL="82f6fcb5a224" + - DEPLOY_USER="annevankesteren" + - TITLE="URL Standard" + - SHORTNAME="url" + - INPUT_FILE="url.bs" install: - curl -O https://sideshowbarker.net/nightlies/jar/vnu.jar From 3164b4960f0db13b9511ef0928675165dbc88773 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 23 Jan 2017 12:41:57 -0500 Subject: [PATCH 03/17] Infer SHORTNAME and INPUT_FILE --- deploy.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index c3ff0876..59943950 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,10 +1,12 @@ #!/bin/bash set -e +SHORTNAME=`git config --local remote.origin.url | sed -n "s#.*/\([^.]*\)\.git#\1#p"` +INPUT_FILE=`find . -name "*.bs"` + LS_URL="https://$SHORTNAME.spec.whatwg.org/" COMMIT_URL_BASE="https://github.com/whatwg/$SHORTNAME/commit/" BRANCH_URL_BASE="https://github.com/whatwg/$SHORTNAME/tree/" -INPUT_FILE="url.bs" WEB_ROOT="$SHORTNAME.spec.whatwg.org" COMMITS_DIR="commit-snapshots" BRANCHES_DIR="branch-snapshots" From 48c1f35dea0df51eb51406876d96c7b89b52f6b7 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 23 Jan 2017 12:48:57 -0500 Subject: [PATCH 04/17] Move HTML checker into deploy script --- .gitignore | 1 + .travis.yml | 6 +----- deploy.sh | 4 ++++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index c384aee9..26190c5c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ deploy_key deploy_key.pub url.html +vnu.jar diff --git a/.travis.yml b/.travis.yml index 6b5e5978..8804d045 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,14 +5,10 @@ env: - ENCRYPTION_LABEL="82f6fcb5a224" - DEPLOY_USER="annevankesteren" - TITLE="URL Standard" - - SHORTNAME="url" - - INPUT_FILE="url.bs" -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/url + notifications: email: on_success: never diff --git a/deploy.sh b/deploy.sh index 59943950..34e1fc45 100755 --- a/deploy.sh +++ b/deploy.sh @@ -78,6 +78,10 @@ echo "" find $WEB_ROOT -print echo "" +# Run the HTML checker on all output +curl -O https://sideshowbarker.net/nightlies/jar/vnu.jar +java -Xss512k -jar vnu.jar --skip-non-html $WEB_ROOT + 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" From d52a69dc44cf2b3a35f87d90c6c2987868f0208f Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 23 Jan 2017 12:52:05 -0500 Subject: [PATCH 05/17] Don't fail if there's no .htaccess --- deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 34e1fc45..c42f238a 100755 --- a/deploy.sh +++ b/deploy.sh @@ -70,7 +70,7 @@ else 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 + cp .htaccess $WEB_ROOT/.htaccess 2>/dev/null || : echo "Living standard output to $WEB_ROOT" fi From 6cc18eab7393a6293c02a3d5ae242413d26710b4 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 23 Jan 2017 12:54:26 -0500 Subject: [PATCH 06/17] Travis still needs help setting the default Java version --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8804d045..baac4ee5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,8 @@ language: generic +jdk: + - oraclejdk8 + env: global: - ENCRYPTION_LABEL="82f6fcb5a224" From 3e31fc086fdd8ec7c3ae348075cd872454555f74 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 23 Jan 2017 13:01:48 -0500 Subject: [PATCH 07/17] One more try at this Java business --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index baac4ee5..01c00a91 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,10 @@ language: generic jdk: - oraclejdk8 - +addons: + apt: + packages: + - oracle-java8-installer env: global: - ENCRYPTION_LABEL="82f6fcb5a224" From 3e769bdb2b43492376b57e0c3ec688e46ed49254 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 23 Jan 2017 13:04:34 -0500 Subject: [PATCH 08/17] Argh --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 01c00a91..3ce2991a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,5 @@ language: generic -jdk: - - oraclejdk8 addons: apt: packages: From 08ad92b712f45b39b29f31684a3796d42953ab69 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 23 Jan 2017 13:07:18 -0500 Subject: [PATCH 09/17] Commit snapshots only if master --- deploy.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/deploy.sh b/deploy.sh index c42f238a..ad95cdd1 100755 --- a/deploy.sh +++ b/deploy.sh @@ -44,17 +44,6 @@ 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; -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 @@ -66,6 +55,17 @@ if [ $BRANCH != "master" ] ; then > $BRANCH_DIR/index.html; echo "Branch snapshot output to $WEB_ROOT/$BRANCHES_DIR/$BRANCH" else + # Commit snapshot, if master + 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; + echo "Commit snapshot output to $WEB_ROOT/$COMMITS_DIR/$SHA" + echo "" + # Living standard, if master curl https://api.csswg.org/bikeshed/ -f -F file=@$INPUT_FILE \ -F md-Text-Macro="SNAPSHOT-LINK $SNAPSHOT_LINK" \ From fb545a3c9cceedbfc6925565a73a4c2f337d2bcd Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 23 Jan 2017 13:10:14 -0500 Subject: [PATCH 10/17] Revert to old strategy for Java on Travis, but only on Travis --- .travis.yml | 4 ---- deploy.sh | 9 +++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3ce2991a..8804d045 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,5 @@ language: generic -addons: - apt: - packages: - - oracle-java8-installer env: global: - ENCRYPTION_LABEL="82f6fcb5a224" diff --git a/deploy.sh b/deploy.sh index ad95cdd1..57895956 100755 --- a/deploy.sh +++ b/deploy.sh @@ -78,9 +78,11 @@ echo "" find $WEB_ROOT -print echo "" -# Run the HTML checker on all output -curl -O https://sideshowbarker.net/nightlies/jar/vnu.jar -java -Xss512k -jar vnu.jar --skip-non-html $WEB_ROOT +# Run the HTML checker when building on Travis +if [ "$TRAVIS" == "true" ]; then + curl -O https://sideshowbarker.net/nightlies/jar/vnu.jar + /usr/lib/jvm/java-8-oracle/jre/bin/java -Xss512k -jar vnu.jar --skip-non-html $WEB_ROOT +fi if [ "$1" != "--local" ]; then # Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc @@ -93,7 +95,6 @@ if [ "$1" != "--local" ]; then eval `ssh-agent -s` ssh-add deploy_key - echo "$SERVER $SERVER_PUBLIC_KEY" > known_hosts scp -r -o UserKnownHostsFile=known_hosts $WEB_ROOT $DEPLOY_USER@$SERVER: fi From f0f1d967c87cd650000a99dc76ae22f37a7b78e7 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 23 Jan 2017 13:10:56 -0500 Subject: [PATCH 11/17] I guess we don't need to ignore vnu.jar anymore since local deploys won't use it --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 26190c5c..c384aee9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,3 @@ deploy_key deploy_key.pub url.html -vnu.jar From 20fa5bdce55209e3953faff6b83cf8bb04825458 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 23 Jan 2017 13:12:34 -0500 Subject: [PATCH 12/17] Setting -Xss seems bad, on Travis? --- deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 57895956..14c87464 100755 --- a/deploy.sh +++ b/deploy.sh @@ -81,7 +81,7 @@ echo "" # Run the HTML checker when building on Travis if [ "$TRAVIS" == "true" ]; then curl -O https://sideshowbarker.net/nightlies/jar/vnu.jar - /usr/lib/jvm/java-8-oracle/jre/bin/java -Xss512k -jar vnu.jar --skip-non-html $WEB_ROOT + /usr/lib/jvm/java-8-oracle/jre/bin/java -jar vnu.jar --skip-non-html $WEB_ROOT fi if [ "$1" != "--local" ]; then From 586d824ac5f1b9c044645858afc776354533bc4f Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 23 Jan 2017 13:23:40 -0500 Subject: [PATCH 13/17] Only output files --- deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 14c87464..7c7056f8 100755 --- a/deploy.sh +++ b/deploy.sh @@ -75,7 +75,7 @@ else fi echo "" -find $WEB_ROOT -print +find $WEB_ROOT -type f -print echo "" # Run the HTML checker when building on Travis From f1af34d017c87107bd2c8f1765a4905997c66866 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 23 Jan 2017 14:35:54 -0500 Subject: [PATCH 14/17] Deduce title from Bikeshed Deduplication is always nice --- .travis.yml | 1 - deploy.sh | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8804d045..6475603f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ env: global: - ENCRYPTION_LABEL="82f6fcb5a224" - DEPLOY_USER="annevankesteren" - - TITLE="URL Standard" script: - bash ./deploy.sh diff --git a/deploy.sh b/deploy.sh index 7c7056f8..011f0777 100755 --- a/deploy.sh +++ b/deploy.sh @@ -3,6 +3,7 @@ set -e SHORTNAME=`git config --local remote.origin.url | sed -n "s#.*/\([^.]*\)\.git#\1#p"` INPUT_FILE=`find . -name "*.bs"` +TITLE=`cat $INPUT_FILE | grep "^Title: .*$" | sed -e "s/Title: //"` LS_URL="https://$SHORTNAME.spec.whatwg.org/" COMMIT_URL_BASE="https://github.com/whatwg/$SHORTNAME/commit/" From 96c7593350ac3740fc2ebdff98d6e2c0b03dbc46 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 23 Jan 2017 14:52:14 -0500 Subject: [PATCH 15/17] Add `make deploy` --- .gitignore | 1 + .travis.yml | 2 +- Makefile | 3 ++ README.md | 5 +-- deploy.sh | 101 ---------------------------------------------------- 5 files changed, 6 insertions(+), 106 deletions(-) delete mode 100755 deploy.sh diff --git a/.gitignore b/.gitignore index c384aee9..70e70958 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ deploy_key deploy_key.pub url.html +deploy.sh diff --git a/.travis.yml b/.travis.yml index 6475603f..3686a1c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ env: - DEPLOY_USER="annevankesteren" script: - - bash ./deploy.sh + - curl --remote-name https://resources.whatwg.org/build/deploy.sh && bash ./deploy.sh notifications: email: diff --git a/Makefile b/Makefile index cf0b16a9..31ffaecc 100644 --- a/Makefile +++ b/Makefile @@ -3,3 +3,6 @@ local: url.bs remote: url.bs curl https://api.csswg.org/bikeshed/ -f -F file=@url.bs > url.html -F md-Text-Macro="SNAPSHOT-LINK LOCAL COPY" + +deploy: url.bs + curl --remote-name --fail https://resources.whatwg.org/build/deploy.sh && bash ./deploy.sh --local diff --git a/README.md b/README.md index fd355f0a..8017411e 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,7 @@ If you want to preview the spec locally, you can either use a locally installed running `make remote`. If you want to do a complete "local deploy" including commit and/or branch snapshots, run - -``` -./deploy.sh --local -``` +`make deploy`. ### Merge policy diff --git a/deploy.sh b/deploy.sh deleted file mode 100755 index 011f0777..00000000 --- a/deploy.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash -set -e - -SHORTNAME=`git config --local remote.origin.url | sed -n "s#.*/\([^.]*\)\.git#\1#p"` -INPUT_FILE=`find . -name "*.bs"` -TITLE=`cat $INPUT_FILE | grep "^Title: .*$" | sed -e "s/Title: //"` - -LS_URL="https://$SHORTNAME.spec.whatwg.org/" -COMMIT_URL_BASE="https://github.com/whatwg/$SHORTNAME/commit/" -BRANCH_URL_BASE="https://github.com/whatwg/$SHORTNAME/tree/" -WEB_ROOT="$SHORTNAME.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="Go to the living standard" -SNAPSHOT_LINK="Snapshot as of this commit" - -echo "Branch = $BRANCH" -echo "Commit = $SHA" -echo "" - -rm -rf $WEB_ROOT || exit 0 - -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; - echo "Branch snapshot output to $WEB_ROOT/$BRANCHES_DIR/$BRANCH" -else - # Commit snapshot, if master - 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; - echo "Commit snapshot output to $WEB_ROOT/$COMMITS_DIR/$SHA" - echo "" - - # 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 .htaccess $WEB_ROOT/.htaccess 2>/dev/null || : - echo "Living standard output to $WEB_ROOT" -fi - -echo "" -find $WEB_ROOT -type f -print -echo "" - -# Run the HTML checker when building on Travis -if [ "$TRAVIS" == "true" ]; then - curl -O https://sideshowbarker.net/nightlies/jar/vnu.jar - /usr/lib/jvm/java-8-oracle/jre/bin/java -jar vnu.jar --skip-non-html $WEB_ROOT -fi - -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 - - echo "$SERVER $SERVER_PUBLIC_KEY" > known_hosts - scp -r -o UserKnownHostsFile=known_hosts $WEB_ROOT $DEPLOY_USER@$SERVER: -fi From 50eb8ade84a21e013a4b9156cd6fb56495f07303 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 23 Jan 2017 15:00:07 -0500 Subject: [PATCH 16/17] Add editorconfig and gitattributes See https://github.com/whatwg/meta/issues/7 --- .editorconfig | 16 ++++++++++++++++ .gitattributes | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitattributes diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..d61ded09 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +indent_size = 1 +indent_style = space +trim_trailing_whitespace = true +max_line_length = 100 + +[Makefile] +indent_style = tab + +[.travis.yml] +indent_size = 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..33497b41 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +* text=auto eol=lf +*.bs diff=html linguist-language=HTML From ba997e3da2e5c2c75656e86d12737b0b6416111e Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 23 Jan 2017 15:01:35 -0500 Subject: [PATCH 17/17] Fail if the deploy script is missing --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3686a1c4..b89326a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ env: - DEPLOY_USER="annevankesteren" script: - - curl --remote-name https://resources.whatwg.org/build/deploy.sh && bash ./deploy.sh + - curl --remote-name --fail https://resources.whatwg.org/build/deploy.sh && bash ./deploy.sh notifications: email: