Skip to content

Commit

Permalink
fix: handle subdir for git providers
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Sep 10, 2022
1 parent 6e4146c commit f4d39d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const github: TemplateProvider = (input) => {
return {
name: parsed.repo.replace('/', '-'),
version: parsed.ref,
subdir: parsed.subdir,
url: `https://github.com/${parsed.repo}/tree/${parsed.ref}${parsed.subdir}`,
tar: `https://github.com/${parsed.repo}/archive/${parsed.ref}.tar.gz`
}
Expand All @@ -16,6 +17,7 @@ export const gitlab: TemplateProvider = (input) => {
return {
name: parsed.repo.replace('/', '-'),
version: parsed.ref,
subdir: parsed.subdir,
url: `https://gitlab.com/${parsed.repo}/tree/${parsed.ref}${parsed.subdir}`,
tar: `https://gitlab.com/${parsed.repo}/-/archive/${parsed.ref}.tar.gz`
}
Expand All @@ -26,6 +28,7 @@ export const bitbucket: TemplateProvider = (input) => {
return {
name: parsed.repo.replace('/', '-'),
version: parsed.ref,
subdir: parsed.subdir,
url: `https://bitbucket.com/${parsed.repo}/src/${parsed.ref}${parsed.subdir}`,
tar: `https://bitbucket.org/${parsed.repo}/get/${parsed.ref}.tar.gz`
}
Expand Down

0 comments on commit f4d39d2

Please sign in to comment.