Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
QA: Simplify Comparison Between Local And Remote Site Files #776
Conversation
|
@harding Half untested LGTM, you made it more simple than I thought! |
|
@saivann thanks! I'll merge this we the next other thing that I merge, and then confirm that it works once the site gets updated. |
harding
merged commit 584e191
into
bitcoin-dot-org:master
Feb 27, 2015
1 check passed
harding
added a commit
that referenced
this pull request
Feb 27, 2015
|
Just a quick follow-up that this commit does not work as expected because the site build does not use the same version of the less (CSS) compiler/compressor we have in our Gemfile, so the main CSS file is slightly different than what I compile locally. For example:
That wouldn't be a problem, except that we use the MD5 hash of the CSS file as its filename to ensure that browsers download the most recent CSS file---so a slightly different CSS filename means every HTML file on the site now has a different hash. Once we get the site build script added to the repository, I'll work on making it use the same build process we describe in the README.md and that we use on Travis. |
|
@harding Ah.. Well actually I kept using the ubuntu packages for the build machine (are the gems used by bundle secure, properly signed and verified?). If you feel comfortable with it, please feel free to update and test the build machine configuration, and updated the update_site.sh script once it's merged. |
harding commentedFeb 26, 2015
This commit adds an extra step to the build process to SHA256 checksum all the files that are built purely based on repository contents. The checksums file is uploaded to the webserver with the rest of the site content.
A separate target is added to the Makefile to compare the remote sha256sums file to a locally-built file to see if they differ. This allows us to detect when a remote build may have gone astray. (This is for QA only, not security.)
I will be adding this step to my usual merge workflow:
git diff HEAD^to review the patchsetgit commit -a -S --amendto sign the mergemake allto build the site locally and run the automated testsgit push upstream masterto push the merged commitsmake manual-checksto run this new check to see if the actual Bitcoin.org site matches what I built locally.Some background info on my desire for this change can be found in issue #773