Skip to content
This repository has been archived by the owner on Feb 27, 2018. It is now read-only.

Support github enterprise release urls for ISO #339

Merged
merged 2 commits into from
Feb 13, 2015

Conversation

databus23
Copy link

This adds support for ISOURL pointing to GitHub Enterprise release API urls.

So this makes the reggae to match

  • https://api.github.com/repos/$ORG/$REPO/releases
  • https://some.host/api/v3/$ORG/$REPO/releases

Background: We need to maintain a fork of the boot2docker.iso on our internal github applicance to make it work inside our sealed corporate network. Having the boot2docker download and boot2docker upgrade work for us would be a blast.

Cheers

@tianon
Copy link
Contributor

tianon commented Feb 5, 2015

This seems reasonable to me.

@ehazlett @bfirsh probably something that ought to be considered for Machine too?

fmt.Printf("Latest release for %s/%s is %s\n", org, repo, tag)
url = fmt.Sprintf("https://github.com/%s/%s/releases/download/%s/boot2docker.iso", org, repo, tag)
if host == "api.github.com" {
url = fmt.Sprintf("https://github.com/%s/%s/releases/download/%s/boot2docker.iso", org, repo, tag)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make this slightly simpler, couldn't this block of the if just set host = "github.com" and then move the second url = ... outside the else?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. Done

@databus23
Copy link
Author

@SvenDowideit Any thoughts on this? Is there a chance for this to be included? Btw the travis build failure seems like an intermittent unrelated one.

@tianon
Copy link
Contributor

tianon commented Feb 13, 2015

The Travis failure will be fixed if you rebase on master. 👍

@ehazlett
Copy link

+1 -- we will also add this to machine too.

@tianon
Copy link
Contributor

tianon commented Feb 13, 2015

Thanks @ehazlett ❤️

LGTM

@databus23 if you can rebase on master so we can have this hit Travis for a once-over compile test, I think we're ready to merge 👍

@ehazlett
Copy link

yw

@databus23
Copy link
Author

Just rebased on master. We have a go from Travis...

@tianon
Copy link
Contributor

tianon commented Feb 13, 2015

Thanks! 👍

tianon added a commit that referenced this pull request Feb 13, 2015
Support github enterprise release urls for ISO
@tianon tianon merged commit da6f800 into boot2docker:master Feb 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants