Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
save
  • Loading branch information
Nikhil Thorat committed Sep 6, 2019
commit 84984025b1f7e1ae48906c5ea617522de992d561
22 changes: 11 additions & 11 deletions scripts/diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// =============================================================================

const {exec} = require('./test-util');
const shell = require('shelljs');
const {readdirSync, statSync, writeFileSync} = require('fs');
const {join} = require('path');
const fs = require('fs');
Expand Down Expand Up @@ -43,18 +44,17 @@ if (branchName == null) {
branchName = exec(`git rev-parse --abbrev-ref HEAD`).stdout.trim();
}

const mergeBase = exec(`git merge-base master ${branchName}`).stdout.trim();

//${branchName}`).stdout.trim(); console.log('merge base', mergeBase);

exec(
`git clone --depth=1 --single-branch --branch ${branchName} ` +
`https://github.com/tensorflow/tfjs ${CLONE_CURRENT_PATH}`);
exec(
`cd ${CLONE_CURRENT_PATH} && ` +
`git checkout ${branchName} &&` +
`git checkout ${commitSha} && ` +
`cd ..`);
exec(`git clone https://github.com/tensorflow/tfjs ${CLONE_CURRENT_PATH}`);

shell.cd(CLONE_CURRENT_PATH);
// exec(`git fetch origin ${branchName}`)
exec(`git checkout ${branchName}`);
const mergeBase = exec(`git merge-base master ${branchName}`).stdout.trim();
exec(`git checkout ${commitSha}`);
shell.cd('..');

exec(
`git clone --depth=1 --single-branch ` +
Expand Down Expand Up @@ -99,8 +99,8 @@ dirs.forEach(dir => {
// Break up the console for readability.
console.log();

// Filter the triggered builds to log by whether a cloudbuild.yml file exists
// for that directory.
// Filter the triggered builds to log by whether a cloudbuild.yml file
// exists for that directory.
triggeredBuilds = triggeredBuilds.filter(
triggeredBuild => fs.existsSync(triggeredBuild + '/cloudbuild.yml'));
console.log('Triggering builds for ', triggeredBuilds.join(', '));
Expand Down