mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 11:03:53 +08:00
ci: fix fetching master into master
This commit is contained in:
parent
d55740d4fa
commit
ba773bad55
@ -33,14 +33,17 @@ logger
|
|||||||
|
|
||||||
// Note: This is based on the gulp task found in the angular/angular repository
|
// Note: This is based on the gulp task found in the angular/angular repository
|
||||||
execSync('git fetch origin');
|
execSync('git fetch origin');
|
||||||
// Travis doesn't have master when running jobs on other branches (minor/patch/etc).
|
|
||||||
execSync('git fetch origin master:master --force');
|
|
||||||
|
|
||||||
// Get PR target branch, default to master for running locally.
|
// Get PR target branch, default to master for running locally.
|
||||||
const currentBranch = process.env.TRAVIS_BRANCH
|
const currentBranch = process.env.TRAVIS_BRANCH
|
||||||
|| process.env.APPVEYOR_REPO_BRANCH
|
|| process.env.APPVEYOR_REPO_BRANCH
|
||||||
|| 'master';
|
|| 'master';
|
||||||
|
|
||||||
|
if (currentBranch !== 'master') {
|
||||||
|
// Travis doesn't have master when running jobs on other branches (minor/patch/etc).
|
||||||
|
execSync('git fetch origin master:master --force');
|
||||||
|
}
|
||||||
|
|
||||||
const output = execSync('git log ' + currentBranch + '..HEAD --reverse --format="%H %s" --no-merges', {
|
const output = execSync('git log ' + currentBranch + '..HEAD --reverse --format="%H %s" --no-merges', {
|
||||||
encoding: 'utf-8'
|
encoding: 'utf-8'
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user