Skip to content
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

Tag versions #21

Closed
pdf opened this issue Jul 5, 2013 · 5 comments
Closed

Tag versions #21

pdf opened this issue Jul 5, 2013 · 5 comments
Assignees
Milestone

Comments

@pdf
Copy link

pdf commented Jul 5, 2013

Please tag versions so that they can be pinned. Also, it would be nice if the output filenames were not versioned (ie - angular-cache.js / angular-cache.min.js rather than angular-cache-n.n.n.js), so that references don't have to change with an update.

@jmdobry
Copy link
Owner

jmdobry commented Jul 9, 2013

See angular-cache/tags. What is it about the tags that isn't to your liking? And what do you mean by "pinned"? Are you using raw.github.com as a CDN?

Drone.io archives the artifacts of each successful build. You can find them at drone.io.

There is a file that isn't versioned, though it isn't minified. See src/angular-cache.js.

It isn't good practice to depend on a 3rd-party library that isn't versioned. See how Google Hosted Libraries (CDN) does it as a reference.

The intention of angular-cache-n.n.n.js is that it is frozen and won't change, saving you and a lot of other people a lot of heartburn. It's up to you to choose which version you want to use with your code. Do you really want to put that power into the hands of someone else?

@pdf
Copy link
Author

pdf commented Jul 9, 2013

See angular-cache/tags
https://github.com/jmdobry/angular-cache/tags. What is it about the
tags that isn't to your liking? And what do you mean by "pinned"? Are
you using raw.github.com as a CDN?

Sorry, I should have been more explicit - I'm using bower for dependency
management. But the tags don't seem to be updated when releases are
made. Also, bower expects semver tags, though the
most recent release supports git hashes, so I guess that will do in lieu
of up to date semver tags.

There is a file that isn't versioned, though it isn't minified. See
src/angular-cache.js
https://github.com/jmdobry/angular-cache/blob/master/src/angular-cache.js

Okay, that should work, any chance of updating the bower.json 'main'
section to use that instead of the versioned files? There's an argument
for a minified version, but most frameworks have some mechanism for
handling that.

It isn't good practice to depend on a 3rd-party library that isn't
versioned. See how Google Hosted Libraries
https://developers.google.com/speed/libraries/devguide (CDN) does it
as a reference.

The intention of angular-cache-n.n.n.js is that it is frozen and won't
change, saving you and a lot of other people a lot of heartburn. It's
up to you to choose which version you want to use with your code. Do
you really want to put that power into the hands of someone else?

Yeah, if your only method of dependency management is the script
declaration, I can see the reasoning for versioned output files, but
using node or bower or whatever, the result is just that you need to
update references in multiple places, rather than a single authoritative
location. Codifying the version in the filename doesn't make much sense
to me, since properly maintained git tags already give you a canonical
path to a specific version.

Anyway, I can just modify the way I reference this lib to use the file
in src/angular-cache.js and track git hashes rather than version
numbers, though that's somewhat more painful.

@jmdobry
Copy link
Owner

jmdobry commented Jul 9, 2013

bower expects semver tags

Ah. While I had published angular-cache to bower, I hadn't actually looked at how bower handles versions. I had assumed that it was similar to npm, where you specify the version you're publishing. From now on I will name my tags strictly with semver.

I will keep the versioned output files around for those who don't use Bower, but update bower.json to use the un-versioned file.

jmdobry referenced this issue Jul 9, 2013
Modified bower.json to use src/angular-cache.js
@jmdobry jmdobry closed this as completed Jul 9, 2013
@ghost ghost assigned jmdobry Jul 9, 2013
@pdf
Copy link
Author

pdf commented Jul 10, 2013

Great, thanks, one problem though - src/ is still in ignore, so src/angular-cache.js is also omitted, even though it's specified in main.

Semver also defines a standard notation for alpha/beta/rc releases too. You don't have to use it, but it makes tag history more readable IMO.

@jmdobry
Copy link
Owner

jmdobry commented Jul 10, 2013

Good catch. The bower stuff should be fixed up for you now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants