fix: use git ls-remote to verify if the remote branch is ahead

This commit is contained in:
Pierre Vanduynslager
2018-06-15 16:16:55 -04:00
parent 24a8052038
commit 2b6378f26f
6 changed files with 35 additions and 31 deletions
+2 -1
View File
@@ -2,7 +2,7 @@ import test from 'ava';
import {writeJson, readJson} from 'fs-extra';
import {stub} from 'sinon';
import execa from 'execa';
import {gitHead as getGitHead, gitTagHead, gitRepo, gitCommits, gitRemoteTagHead} from './helpers/git-utils';
import {gitHead as getGitHead, gitTagHead, gitRepo, gitCommits, gitRemoteTagHead, push} from './helpers/git-utils';
import gitbox from './helpers/gitbox';
import mockServer from './helpers/mockserver';
import npmRegistry from './helpers/npm-registry';
@@ -609,6 +609,7 @@ test.serial('Exit with 1 if missing permission to push to the remote repository'
/* Initial release */
t.log('Commit a feature');
await gitCommits(['feat: Initial commit']);
await push();
t.log('$ semantic-release');
const {stdout, code} = await execa(
cli,