Skip to content
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

Update index.html and automate the process #8

Merged
merged 1 commit into from
Jul 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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_index.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 occurrences 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