|
| 1 | +We will start with building Ubuntu PPA first as it used in further CI process to validate that php-v8 is not broken. |
| 2 | + |
| 3 | +To track v8 changes you can use these links: |
| 4 | + - https://github.com/v8/v8/commits/master/include/v8.h - to keep track on v8 upstream changes |
| 5 | + - https://omahaproxy.appspot.com/ - to keep track v8 channel(version) heads and what version is used in chrome |
| 6 | + |
| 7 | + |
| 8 | +## Building libv8 |
| 9 | + |
| 10 | +1. **Skip this step if you are updating v8 patch release version.** To bump minor v8 version (e.g. from 6.3 to 6.4), |
| 11 | + create new `libv8-X.Y` PPA for new version. As V8 could be build for i386 but only from amd64, which is not how PPA |
| 12 | + works, it's also make sense to keep new PPA amd64-only. Also we don't use i386 so we don't want to worry about it. |
| 13 | +2. Update libv8 Makefile (`packaging/libv8/Makefile`) with new libv8 version by setting proper values in |
| 14 | + `GIT_VERSION=X.Y.Z` and `NAME=libv8-X.Y` variables. |
| 15 | +3. Commit changes with `build libv8` commit message and wait until libv8 PPA build done. |
| 16 | +4. Don't forget to update `libv8 >= <new X.Y.Z version>` dependency for php-v8 PPA in `packaging/php-v8/debian/control` |
| 17 | + and also change php-v8 PPA repo dependency to include new `libv8-X.Y` PPA |
| 18 | + (https://launchpad.net/~pinepain/+archive/ubuntu/php-v8/+edit-dependencies), it's done by looking for ppa by full name, |
| 19 | + e.g. `pinepain/libv8-X.Y`. |
| 20 | + |
| 21 | +## After libv8 PPA build done |
| 22 | + |
| 23 | +1. Copy fresh `libv8-X.Y` build packages from `libv8-experimental` (default target for all libv8 builds we trigger) |
| 24 | + to it `libv8-X.Y` PPA. Do not rebuild, just copy binaries. |
| 25 | +2. **Wait for packages copied and published!** |
| 26 | +3. If there was a minor version bump in `libv8` (not patch), create new dockerfiles for it in |
| 27 | + [php-v8-docker](https://github.com/pinepain/php-v8-docker) and set `ARG V8=X.Y` to proper version. |
| 28 | +4. Go to [php-v8-docker Docker Hub](https://hub.docker.com/r/pinepain/php-v8-docker) and remove old Docker tags from |
| 29 | + been rebuild on push as we don't need them anymore and replace them with a new one (we still need to keep old tags |
| 30 | + for CI purpose and just in case things won't go smooth and we have to rollback). |
| 31 | +5. Rebuild/publish docker images to include new `libv8` version. |
| 32 | + |
| 33 | +## After docker images rebuilt/published |
| 34 | + |
| 35 | +1. Update min required `libv8` version in [php-v8](https://github.com/pinepain/php-v8)/config.m4, `V8_MIN_API_VERSION_STR=X.Y.Z`. |
| 36 | +2. If there was new docker images published, update reference to them in [php-v8](https://github.com/pinepain/php-v8)/.travis.yml |
| 37 | + and in [php-v8](https://github.com/pinepain/php-v8)/Dockerfile, and set proper `V8` and `TAG` value there. |
| 38 | +3. Also, update references to v8 version in [php-v8](https://github.com/pinepain/php-v8)/scripts/provision/provision.sh, |
| 39 | + it's normally could be done by replacing old version with new, e.g. `6.3` => `6.4`. |
| 40 | +4. On every version bump update [php-v8](https://github.com/pinepain/php-v8)/README.md file with proper min v8 version required/tested. |
| 41 | +5. If you use vagrant, re-provision your local dev env at this step to fetch/add new `libv8` version. |
| 42 | + It's generally a good idea to remove old `libv8` versions as well and remove their PPA from apt sources list at this point. |
| 43 | +6. **Make sure you tested [php-v8](https://github.com/pinepain/php-v8) locally first before pushing to remote**, |
| 44 | + upgrading v8 could be tricky as it may break BC even in patch releases (that's why we started to have separate |
| 45 | + PPAs for minor version to somehow couple with this issue in minor releases). |
| 46 | +7. Note, that doing all this in a separate branch and merging that later into master is a nice and safe idea |
| 47 | + (note, you may skip PR overhead and do fast-forward merge locally to master). |
| 48 | +8. Commit message should state that it is v8 version bump, e.g. `Require libv8 >= X.Y.Z` |
| 49 | +9. Push changes and make sure build is green. If not, fix code/update tests and repeat. |
| 50 | + |
| 51 | + |
| 52 | +## Building packages for macOS Homebrew |
| 53 | + |
| 54 | +1. **Skip this step if you are updating v8 patch release version.** If it is a minor version bump, create new `v8@X.Y` formula. |
| 55 | +2. **Skip this step if you are updating v8 patch release version.** Create new `v8:X.Y` Package on bintray for it. |
| 56 | +2. Remove/reset formula `revision` if it is version bump and not rebuild. |
| 57 | +3. Build `v8@X.Y` (locally or with travis if it provides releavent macOS version) and publish. |
0 commit comments