Question

I register a version of my "angular-backstrech-adrr" to bower:

bower register angular-backstrech-adrr git@github.com:AladdinMhaimeed/angular-backstrech-adrr.git

this is bower.json:

{
  "author": "Aladdin Mhaimeed",
  "name": "angular-backstrech-adrr",
  "version": "1.0.4",
  "main": "angular-backstretch.js",
  "dependencies": {
          "jquery": ">2.0.0",
          "jquery-backstretch": "https://raw.github.com/srobbin/jquery-backstretch/master/jquery.backstretch.min.js"
  }

}

Bower says it is successfully registered, but when I use:

bower info angular-backstretch-adrr 

It says there is no version available.

If I change the version and try to register again, I get: EDUPLICATE

Is there something wrong in the bower.json? Anything wrong with the syntax?

Was it helpful?

Solution

Your package only needs to be registered once. The versions are drawn from your Git tags. From the Bower documentation:

Your package must be available at a Git endpoint (e.g., GitHub); remember to push your Git tags!

Not to worry, I had no idea what this meant either. After poking around a bit, I stumbled across this.

Here's the quick and easy way to solve your problem... from your project's root directory run:

% git tag v1.0.4

If you type:

% git tag

you'll see the version you just created. Now push your Git tags:

% git push origin v1.0.4

Now when you run bower info angular-backstretch-adrr, you'll see the version you just pushed.

OTHER TIPS

Above answer is correct except v in front of version is incorrect.

//Incorrect
% git tag v1.0.4

//Correct
% git tag 1.0.4

Now push it. Github also complains when try to put v in front of tag.

Live log of bower

bower not-cached    git://github.com/speedovation/Inventive.git#*
bower resolve       git://github.com/speedovation/Inventive.git#*
bower download      https://github.com/speedovation/Inventive/archive/0.9.6.tar.gz
bower progress      inventive#* received 0.4MB
bower progress      inventive#* received 0.5MB

See 0.9.6 in log. If v used it will fail.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top