Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bower git package with a commit id

Is it possible to include a github repo from a specific id?

For example I need angular.js repo with e12e584ca8db306dce8e0f4d3a212d77fbae966c id.

Is this possible?

 "dependencies": 
      "angular-my-repo":"https://github.com/angular/angular.js/tree/e12e584ca8db306dce8e0f4d3a212d77fbae966c",
      "moment": "~2.1.0"
 },

or what is the correct syntax?

like image 267
Cemo Avatar asked Sep 05 '13 14:09

Cemo


2 Answers

bower install --save git://github.com/angular/angular.js#e12e584ca8db306dce8e0f4d3a212d77fbae966c 

or

bower install --save https://github.com/angular/angular.js.git#e12e584ca8db306dce8e0f4d3a212d77fbae966c

see this thread

https://github.com/bower/bower/issues/856

like image 167
Cemo Avatar answered Nov 09 '22 18:11

Cemo


In addition to Cemo's answer, It is possible to install bower package from a commit using the char '#'

i.e

bower install --save package_name#commit_sha

e.g

bower install --save angular.js#e12e584ca8db306dce8e0f4d3a212d77fbae966c

This will add to your bower.json the depndency

"angular.js":"e12e584ca8db306dce8e0f4d3a212d77fbae966c"

Hope this helps!

like image 2
AsafSavich Avatar answered Nov 09 '22 16:11

AsafSavich