fix(repositoryUrl): on beta repositoryUrl needs auth for pre-release flows (#1186)

This commit is contained in:
jmodjeski75
2019-06-05 11:33:54 -07:00
committed by Gregor Martynus
parent 37bcc9e515
commit 3610422959
8 changed files with 51 additions and 44 deletions
+2 -2
View File
@@ -2,8 +2,8 @@ const {isString, remove, omit, mapValues, template} = require('lodash');
const micromatch = require('micromatch');
const {getBranches} = require('../git');
module.exports = async ({cwd}, branches) => {
const gitBranches = await getBranches({cwd});
module.exports = async (repositoryUrl, {cwd}, branches) => {
const gitBranches = await getBranches(repositoryUrl, {cwd});
return branches.reduce(
(branches, branch) => [
+3 -2
View File
@@ -8,16 +8,17 @@ const expand = require('./expand');
const getTags = require('./get-tags');
const normalize = require('./normalize');
module.exports = async context => {
module.exports = async (repositoryUrl, context) => {
const {cwd, env} = context;
const remoteBranches = await expand(
repositoryUrl,
context,
context.options.branches.map(branch => (isString(branch) || isRegExp(branch) ? {name: branch} : branch))
);
await pEachSeries(remoteBranches, async ({name}) => {
await fetch(name, {cwd, env});
await fetch(repositoryUrl, name, {cwd, env});
});
const branches = await getTags(context, remoteBranches);