Closed qinfchen closed 9 years ago
Currently, bower.json specifies the following:
"main": "WebCola/cola.v3.min.js",
cola.v3.min.js is still the file we are generating... or should the version also match the minor release? e.g. cola.v3.0.1.min.js ?
Sorry for my ignorance, I've never really had anything to do with bower. I believe it was @jkschneider who created the last bower release.
Anyway, I had a go at registering it:
bash-3.1$ bower register webcola https://github.com/tgdwyer/WebCola.git
bower convert Converted https://github.com/tgdwyer/WebCola.git to git://github.com/tgdwyer/WebCola.git
bower webcola#* resolve git://github.com/tgdwyer/WebCola.git#*
bower webcola#* download https://github.com/tgdwyer/WebCola/archive/v3.0.1.tar.gz
bower webcola#* progress received 12.8MB
bower webcola#* extract archive.tar.gz
bower webcola#* mismatch Version declared in the json (0.1.0) is different than the resolved one (3.0.1)
bower webcola#* resolved git://github.com/tgdwyer/WebCola.git#3.0.1
? Registering a package will make it installable via the registry (https://bower.herokuapp.com), continue?: Yes
bower webcola register git://github.com/tgdwyer/WebCola.git
bower EUNKNOWN Unknown error: 403
Any idea what went wrong?
No worries, there is no need to create a new minified file with version as part of the name. Your package only needs to be registered once and the bower versions are drawn from your Git tags. Just like https://github.com/tgdwyer/WebCola/issues/24, you need to create a new tag for the release.
Before creating a new tag, please make sure the cola.v3.min.js contains all the changes you want to include in the release:)
Thanks, but I'm still a bit confused. What should the new tag be called precisely? Is it the full minified file name, i.e. cola.v3.min.js? We already have tags "v3" and "v3.0.1"...
The minified file should be something like "cola.min.js" that doesn't contain the version number and have bower.json specify the version. Maybe tag "v3.1.0"?
I see, but then it would be difficult to have multiple versions exist in the same directory... is there anyway around that?
You don't need to keep multiple versions in the same directory, the version is tracked by tags. Take a look at jquery's tags, the bower.json for 2.1.3 and 2.1.2 are identical except the version number. https://github.com/jquery/jquery/blob/2.1.3/bower.json https://github.com/jquery/jquery/blob/2.1.2/bower.json
I created a PR to clean up the build files. https://github.com/tgdwyer/WebCola/pull/86
thanks, it's merged. Can I close this now?
can you create a new tag for v3.1.0?
done!
Weird, I don't see the new tag.
Tag v3.1.0 is created.
Hi @tgdwyer,
Version 3.0.1 doesn't have the right main file. When are you planning to release a new version of bower package?
Thanks,