11

I don't want build master branch. Instead I would like to build a specific tag which the latest stable release as same as my Desktop Chrome.

1 Answer 1

14

This is probably the fastest way to fetch Chromium's source code. Suppose 59.0.3071.115 is the version of Chromium, you wish to build. You run this command:

git fetch https://chromium.googlesource.com/chromium/src.git +refs/tags/59.0.3071.115:chromium_59.0.3071.115

If you don't want the history to be fetched (faster fetching of Chromium source code):

git fetch https://chromium.googlesource.com/chromium/src.git +refs/tags/59.0.3071.115:chromium_59.0.3071.115 --depth 1

Now from your Chromium repo, use the following command to show a list of tags available

git tag

You have to checkout that tag by running

git checkout tags/59.0.3071.115

Then run these commands in the order listed below to pull all the third-party dependencies:

gclient sync
gclient sync --with_branch_heads
gclient runhooks

You can find the dev, beta, canary, latest and stable version info of Chromium from this page: https://chromiumdash.appspot.com/schedule

Now, you should be able to build Chromium. Let me know, if it works

4
  • Other answers have you also do a git checkout. Can you explain why you only have to do a fetch and then gclient sync?
    – Ebsan
    Commented Oct 3, 2018 at 17:51
  • 2
    @WiteCastle You have to checkout that tag by running git checkout tags/59.0.3071.115. Use git tag to show a list of tags available. That fetch command will just fetch the last commit of that branch, so it won't fetch the whole history. gclient sync will download the third party dependencies needed for Chromium to compile
    – Asesh
    Commented Oct 4, 2018 at 4:16
  • 1
    @Asesh Thank you so much. Your knowledge fill the last part of the picture. I finally automate the build of headless chrome and published on Docker HUB. hub.docker.com/r/microbox/chromium-headless
    – Ling
    Commented Mar 5, 2019 at 8:16
  • 3
    If using --depth flag with git fetch, make sure to use --depth 4 or a reasonable number so that at least one commit in the history has Cr-Commit-Position: in the commit message. This metadata is necessary for the hooks (and build) to run successfully. Commented May 17, 2022 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.