Skip to content

Latest commit

 

History

History
67 lines (59 loc) · 2.29 KB

File metadata and controls

67 lines (59 loc) · 2.29 KB

Gannett Build Instructions

Quickstart

  1. Install yarn
  2. Clone
    git clone git@github.com:GannettDigital/Prebid.js.git
    cd Prebid.js
  3. Run build command
    make build

Compiled script will be built to build/dist/prebid.js

If you have access to the ads-gci-www-gannett-cdn-com Google Cloud bucket and have gcloud installed, you can automatically build and upload to the CDN in one step using make sync. This also builds and uploads a dev (unminified) version.

Details on steps run during this process can be found below in Build Details.

Adding a Module

Add module name to modules.json. Change must be committed before running build command.

Bumping Prebid Version

  • Ensure desired version exists in current tags:
    • git tag -l | grep "my-desired-version"
    • If your version is not listed, fetch upstream tags:
      • git remote add upstream git@github.com:prebid/Prebid.js.git
      • git fetch upstream
      • Ensure version is now listed in git tag -l
  • Update version number in gannett-version.txt

Merging Upstream Changes

git remote add upstream git@github.com:prebid/Prebid.js.git
git checkout [-b] my-update-branch
git fetch upstream --prune
git rebase -i upstream/master my-update-branch

Who knows, you might not even have any merge conflicts! 🤞

Build Details

What happens when I run make build/make sync?

  1. Checkout appropriate version based on contents of gannett-version.txt
    git checkout tags/$(<gannett-version.txt)
  2. Checkout modules.json from master since it won't exist at the tag
    git checkout master -- modules.json
  3. Run gulp build command
    gulp build --modules=modules.json
  4. (make-sync only) Upload production file to CDN
    gsutil cp ./build/dist/prebid.js gs://ads-gci-www-gannett-cdn-com/vendor/pbjsandwich.min.js
  5. (make-sync only) Build dev file
    gulp build-bundle-dev --modules=modules.json
  6. (make-sync only) Upload dev file to CDN
    gsutil cp build/dev/prebid.js gs://ads-gci-www-gannett-cdn-com/vendor/pbjsandwich.js