Skip to content

Commit

Permalink
Properly resolve SHA for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
devversion committed May 14, 2017
1 parent 7159915 commit 24f74d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/gulp/tasks/payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ task('payload', ['material:clean-build'], async () => {
if (isTravisBuild()) {
// Open a connection to Firebase. For master builds the database will use an admin account.
const database = openFirebaseDashboardDatabase(isTravisMasterBuild());
const currentSha = process.env['TRAVIS_COMMIT'];
const currentSha = process.env['TRAVIS_PULL_REQUEST_SHA'] || process.env['TRAVIS_COMMIT'];
const previousPayload = await getLastPayloadResults(database);

// Calculate library sizes by combining the CDK and Material FESM 2015 bundles.
const previousSize = previousPayload.cdk_fesm_2015 + previousPayload.material_fesm_2015;
const currentSize = results.cdk_fesm_2015 + results.material_fesm_2015;
const deltaSize = currentSize - previousSize;

setGithubStatus(process.env['TRAVIS_COMMIT'], {
await setGithubStatus(process.env['TRAVIS_COMMIT'], {
result: true,
name: 'Library Payload',
url: `https://travis-ci.org/angular/material2/jobs/${process.env['TRAVIS_JOB_ID']}`,
Expand Down

0 comments on commit 24f74d6

Please sign in to comment.