Last active
November 3, 2017 18:56
-
-
Save kevinlawler/bbe6f7590138634ba37eed0d98be1d6a to your computer and use it in GitHub Desktop.
New Release Runbook (if it doesn't work on your system) - Brave
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New Release Runbook (if it doesn't work on your system) | |
(if you get git network failures, try raising config http.postBuffer) | |
Definitions: | |
B-L-B: .../browser-laptop-bootstrap | |
B-L: .../browser-laptop-bootstrap/src/browser-laptop | |
MUON: .../browser-laptop-bootstrap/src/electron | |
1. Download it: | |
There are two possibilities for your download. | |
Possibility A: You are doing an `npm run sync -- --all` on B-L-B master. | |
Inside B-L-B: | |
npm run sync -- --all | |
(Note: this will silently drop any uncommitted/unstashed git changes, via reset) | |
Possibility B: You are checking out a non-master B-L-B and/or MUON branch. | |
If checking out a MUON branch: | |
cd MUON | |
git fetch origin | |
git checkout -b MY_MUON_BRANCH origin/MY_MUON_BRANCH | |
If checking out a B-L-B branch (potentially a MUON bootstrap branch): | |
cd B-L-B | |
git fetch origin | |
git checkout -b MY_BLB_BRANCH origin/MY_BLB_BRANCH | |
It may be necessary to apply patches: | |
./src/electron/script/apply-patches.py | |
Finally, do `rm -rf node_modules; npm install; npm run init` inside B-L-B. | |
These seem to be safe to run without triggering a full rebuild: | |
`npm run init` in B-L-B: triggers 5K targets instead of 25K+ | |
`rm -rf node_modules; npm install; npm run init` in B-L-B: triggers 10K targets instead of 25K+ | |
`npm install` in B-L: didn't seem to trigger much of anything | |
`rm -rf node_modules; npm install` in B-L: didn't seem to trigger much of anything | |
Warning: on macOS, [automatic] Xcode updates will trigger full rebuild | |
2. If you like, try to run and build first: | |
Inside B-L-B: | |
npm run build -- Debug && npm run start -- Debug | |
(But make sure you have your watch process running first.) | |
This could take a while which is why you might want to skip ahead | |
to avoid any anticipated failures near the end | |
3. Verify you are on the right versions of tools: | |
$ node --version | |
v8.8.1 # as of 2017.10.31 | |
Change node version: | |
n 8.8.1 | |
If necessary, first: | |
sudo npm cache clean -f | |
sudo npm install -g n | |
$ npm --version | |
5.5.1 # as of 2017.10.31 | |
Change npm version: | |
npm install [email protected] -g | |
$ pip list jinja2 | |
Jinja2 (2.8.1) # as of 2017.04.26 | |
4. Check that git is sane and updated: | |
The B-L directory is a git repo, so are some of the subdirectories, | |
including B-L and MUON. | |
For each one, check that the repo is on the `master` branch (or the ones you're using), | |
that you have pulled the latest from remote, and that you are fast-forwarded to HEAD. | |
(Or, equivalently, that your branch has merged or rebased a `master` like this.) | |
Some common causes of problems here are that you are on your own un-updated branch | |
instead of master. I have also seen a detached head happen here (no idea how). | |
5. Optional: The equivalent here of "make clean" is as follows. This will get all of | |
debug and release and will necessarily trigger a full rebuild. | |
$ rm -fr src/out | |
6. Optional?: Clear some global node-related files/dirs | |
$ npm cache clean | |
$ rm -rf ~/.node-gyp | |
$ rm -rf ~/.electron | |
7. Refresh node_modules | |
Inside the B-L directory: | |
$ rm -rf node_modules | |
$ npm install | |
(In extreme cases you might want to try on the other directories, B-L-B, MUON, etc.) | |
Inside the B-L-B directory & others: | |
#the above, plus: | |
$ npm run init | |
8. Retry building |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment