Skip to content

Commit

Permalink
Update index.html and automate the process
Browse files Browse the repository at this point in the history
  • Loading branch information
eloquence committed Jul 1, 2020
1 parent cf6bb9e commit dbf2122
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ To sign the rules, see HTTPS Everywhere docs [here](https://github.com/EFForg/ht

For the production rules this signing must be done via the official signing ceremony and the existing SD release key (JWK formatted version of the pubkey is in `release-pubkey.jwk`). There is some internal documentation with more detailed instructions on this, ping `@redshiftzero` if you need to do this.

Once you have the signature, place the files to serve in the root of the git tree in this repository,and then update the directory listing in `index.html`.
Once you have the signature, place the files to serve in the root of the git tree in this repository, and then update the directory listing in `index.html` using the `update_version.sh` shell script in this directory.

Commit the resulting `index.html` and all files to be served.
Inspect the diff. If it looks good, commit the resulting `index.html` and all files to be served.

Upon merge the ruleset release will be live.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<html>
<a href='rulesets-signature.1588004096.sha256'>rulesets-signature.1588004096.sha256</a><br>
<a href='rulesets-signature.1593528236.sha256'>rulesets-signature.1593528236.sha256</a><br>
<a href='latest-rulesets-timestamp'>latest-rulesets-timestamp</a><br>
<a href='default.rulesets.1588004096.gz'>default.rulesets.1588004096.gz</a><br>
<a href='default.rulesets.1593528236.gz'>default.rulesets.1593528236.gz</a><br>
</html>
12 changes: 12 additions & 0 deletions update_index.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -e
TIMESTAMP="$(<latest-rulesets-timestamp)"

# Replaces all occurrances of the form .0. with the new timestamp, where 0
# is any sequence of numbers with at least one digit
sed -Ei "s/\.[0-9]+\./\.$TIMESTAMP\./g" index.html

echo "Timestamp in index.html has been set to $TIMESTAMP. Please inspect the"
echo "diff below."
echo
git diff index.html

0 comments on commit dbf2122

Please sign in to comment.