Comments (13)
Neat, thanks!
from gopkg.
This is a great idea @nathany . Looking forward to it.
from gopkg.
Great idea indeed!
from gopkg.
Just so you know, I probably won't get to this until September. Other priorities right now.
from gopkg.
For now, this is focused on having a badge. We can follow up with providing information on how to get the badge.
Going through a handler that retrieves the highest ref from GitHub and then redirects to shields.io for the SVG may be expensive if it needs to be done on every request for the badge.
- Caching the highest version would complicate deployment (unless it's just in memory).
- Invalidating the cache would require a GitHub webhook which complicates things for users as well (unless it's just time based, which is less precise).
from gopkg.
Caching the highest version would complicate deployment (unless it's just in memory).
Can be done in-memory with a simple map[pkg]version
(both strings)..
Update when 10s old, remove from cache when 1d old ?
Letting users connect a webhook before the badge will work isn't too userfriendly, but do-able... Then it's not required to get a list of all the branches from the github repo anymore..
The downside of updating based on webhook calls is ofcourse that you'd need to sync this information between the deployments.. @niemeyer was it loadbalanced or failover? In th second case it could still work fairly easy.
from gopkg.
Something like that should work fairly well. I can start without any sort of caching and see how it goes. Still figuring out the code base though #26.
Right now it's possible to use gopkg.in with a repo that has the proper tags even if they aren't familiar with gopkg.in. To keep that ability, webhooks should be optional at best... if supported at all.
from gopkg.
Any update on this? I'd really like to put a badge on some of my repos :)
from gopkg.
Sorry Evan. I haven't looked at this at all in the past 6 months. :-(
from gopkg.
As a work around, you can use Shields.io to create a custom badge, but you will have to update the version # manually with each release.
from gopkg.
If we expose an endpoint that returns a list of all[1] or even the latest versions based on username/repo
I could add a badge to http://shields.io. I'll look into the code and see if I can add it myself. A good thing about this approach is that shields.io itself handles the caching.
[1] This would also close #12
from gopkg.
I'd prefer to have the badge being served by gopkg.in itself because that's both easy and much more convenient, but I'm not against people using something else if they wish. Caching should be taken into account either way, though. We can't assume that people would not use the API if we provide it.
from gopkg.
Though gopkg.in can still be applicable when using the vendor support that Go 1.6 is helping enable, I personally don't see myself using gopkg.in in the future (eg. https://github.com/go-fsnotify/fsnotify/issues/108). That is to say, I'll leave this idea open, but I have no plans to work on it. So long and thanks for the fish.
from gopkg.
Related Issues (20)
- go get fails with status 301 HOT 2
- Public Report Not Activated HOT 3
- changeRefs implementation causes an ambiguous default branch. HOT 1
- getting master instead of v1 HOT 6
- gopkg doesn't choose latest tag in major release HOT 1
- beta version 0.1 and 0.2 HOT 1
- go get: remote error: tls: internal error HOT 3
- fsnotify breakage HOT 6
- Installed binary contains version number in name HOT 5
- "cannot talk to GitHub" HOT 80
- Failed to connect to gopkg.in port 443: Operation timed out HOT 1
- cannot talk to GitHub HOT 1
- Installations from gopkg.in failing HOT 8
- gopkg.in/srwiley/oksvg.gradfix does not resolve HOT 1
- Do not accept self-signed certificates HOT 1
- go get gopkg.in/yaml.v1 fatal error HOT 1
- Git transfer failure when fetching with Go 1.12 or older HOT 1
- fatal: unable to access 'https://gopkg.in/yaml.v3/': server certificate verification failed. HOT 8
- Cannot talk to GitHub HOT 48
- Cannot obtain refs from GitHub: cannot talk to GitHub HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gopkg.