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

Build: Allow Rebuilding A Particular Commit #977

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

harding commented Jul 26, 2015

This PR updates the build script with two minor improvements:

  1. When force building, the script no longer exits if you're attempting to the most recently-built commit.
  2. The commit ID (commitish) of the most recently built commit is saved for use in other scripts

The intention here is to be able to create a cronjob for PR #976 that will force rebuild the site every night at midnight. Point 1 makes that possible without the hard rebase hack @saivann and I currently use when manually rebuilding and point 2 prevents an automatic force build from allowing someone to bypass the signed commits by pushing a commit to master at exactly the right time.

I also switched the commit.txt command in the Makefile to use the same syntax as the build file, as I thought Saïvann's way was better.

This PR has not been tested, but I will test it when I manually update the file on the build server.

Contributor

saivann commented Jul 26, 2015

@harding As I understand it, the script would actually checkout to last commit from a repository provided as a command line argument (BUILD_COMMITISH). If so, what repository would you use here? I am not sure that I understand correctly what is in place to prevent unsigned commits to be built if this script is called with -force automatically.

Alternatively, maybe using a "-rebuild" option that does the same as "-auto", but skipping "$LASTLOCALCOMMIT == $LASTREMOTECOMMIT", would add less complexity and risk of messing up with "-force" (at the cost of always needing last commit to be signed).

Contributor

harding commented Jul 26, 2015

@saivann the command line argument can be a repository or any other commitish, but it's intended to be a particular commit. For example, if I wanted to rebuild the site right now, I would run:

update_site.sh force 09acaafbb0f265934e45f45acf99eb9e2570b787

The cronjob would be:

update_site.sh force $( cat /bitcoin.org/last-successful-build-commitish )

Since that file is only updated after a successful build, that previous build would've had to have either been signed (verified during that build by auto) or manually force built by either you or me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment