-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom domains for [JitPack] artifacts #8333
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for taking this forward
dateAdded: new Date('2019-03-31'), | ||
}), | ||
redirector({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason the tests are failing is:
Error: Duplicate service names found: {
"JitpackVRedirect": 2
}
we'll need to manually give each of these redirects a unique name when we declare them as the auto-generated names are clashing.
https://github.com/badges/shields/blob/master/core/base-service/redirector.js#L46-L50
You can run npm test
locally to run the core tests and liners
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you; I couldn't get npm install
to work... I've fixed it and was finally able to test the code.
static route = { | ||
base: 'jitpack/v', | ||
pattern: ':vcs(github|bitbucket|gitlab|gitee)/:user/:repo', | ||
base: 'jitpack/version', | ||
pattern: ':groupId/:artifactId', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets leave a comment linking to #8312 to explain why we're using /version
rather than /v
here.
t.create('jitpack version redirect (github)') | ||
.get('/github/jitpack/maven-simple.svg') | ||
.expectRedirect('/jitpack/version/com.github.jitpack/maven-simple.svg') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
cheers - merging with slightly tweaked names |
closes #8312
Introduced a new
jitpack/version
endpoint:jitpack/v
redirects to it, either with no VCS (still defaulting to GitHub), or with a VCS previously supported.It uses the full
groupId
from jitpack as input (usuallycom.github.user
, but custom domains, likeio.jitpack
, as well).