mirror of https://github.com/embarklabs/embark.git
Merge pull request #897 from embark-framework/bug_fix/template-downloader-branch-names
allow for '/' in branch name when handling github shortcuts
This commit is contained in:
commit
e744a24557
|
@ -127,8 +127,9 @@ class TemplateGenerator {
|
|||
|
||||
getExternalProject(uri) {
|
||||
let url, folder;
|
||||
if (uri.split('/').length === 2) {
|
||||
//e.g embark-framework/embark
|
||||
const regex = /^((git@)?(www\.)?github\.com\/)|(https?:\/\/)/;
|
||||
if (!uri.match(regex) && uri.split('/').length >= 2) {
|
||||
//e.g embark-framework/embark, embark-framework/embark#branch, embark-framework/embark#features/branch
|
||||
let repoPartAndBranch = uri.split('#');
|
||||
let repoPart = repoPartAndBranch[0];
|
||||
let branchName = (repoPartAndBranch.length === 2)? repoPartAndBranch[1] : "master";
|
||||
|
|
Loading…
Reference in New Issue