fix(repositoryUrl): on beta repositoryUrl needs auth for pre-release flows (#1186)
This commit is contained in:
committed by
Gregor Martynus
parent
37bcc9e515
commit
3610422959
@@ -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) => [
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user