Giter Site home page Giter Site logo

uncleweb / git-vendor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brettlangdon/git-vendor

0.0 1.0 0.0 19 KB

Git command for managing git vendored dependencies

Home Page: https://brettlangdon.github.io/git-vendor/

License: MIT License

Makefile 32.10% Shell 67.90%

git-vendor's Introduction

git-vendor

A git command for managing vendored dependencies.

git-vendor is a wrapper around git-subtree commands for checking out and updating vendored dependencies.

By default git-vendor conforms to the pattern used for vendoring golang dependencies:

  • Dependencies are stored under vendor/ directory in the repo.
  • Dependencies are stored under the fully qualified project path.
    • e.g. https://github.com/brettlangdon/forge will be stored under vendor/github.com/brettlangdon/forge.

Usage

See https://brettlangdon.github.io/git-vendor for the current MAN page documentation.

git-vendor provides the following commands:

  • git vendor add [--prefix <dir>] <name> <repository> [<ref>] - add a new vendored dependency.
  • git vendor list [<name>] - list current vendored dependencies, their source, and current vendored ref.
  • git vendor update <name> [<ref>] - update a vendored dependency.

Installation

Manually:

git clone https://github.com/brettlangdon/git-vendor
cd ./git-vendor
make

One-liner:

curl -sSL https://git.io/vzN5m | sudo bash /dev/stdin

Homebrew (thanks to @liamstask):

brew install git-vendor

Example

$ # Checkout github.com/brettlangdon/[email protected] under vendor/github.com/brettlangdon/forge
$ git vendor add forge https://github.com/brettlangdon/forge v0.1.6
+ git subtree add --prefix vendor/github.com/brettlangdon/forge --message 'Add "forge" from "https://github.com/brettlangdon/[email protected]"

git-vendor-name: forge
git-vendor-dir: vendor/github.com/brettlangdon/forge
git-vendor-repository: https://github.com/brettlangdon/forge
git-vendor-ref: v0.1.6
' https://github.com/brettlangdon/forge v0.1.6 --squash
git fetch https://github.com/brettlangdon/forge v0.1.6
warning: no common commits
remote: Counting objects: 405, done.
remote: Total 405 (delta 0), reused 0 (delta 0), pack-reused 404
Receiving objects: 100% (405/405), 68.31 KiB | 0 bytes/s, done.
Resolving deltas: 100% (227/227), done.
From https://github.com/brettlangdon/forge
 * tag               v0.1.6     -> FETCH_HEAD
Added dir 'vendor/github.com/brettlangdon/forge'

$ # List current vendored dependencies
$ git vendor list
[email protected]:
	name:	forge
	dir:	vendor/github.com/brettlangdon/forge
	repo:	https://github.com/brettlangdon/forge
	ref:	v0.1.6
	commit:	3335840c5f0ad9e821006588f1b16a3385d9c318

$ # Update existing dependency to a newer version
$ git vendor update forge v0.1.7
From https://github.com/brettlangdon/forge
 * tag               v0.1.7     -> FETCH_HEAD
Merge made by the 'recursive' strategy.
 vendor/github.com/brettlangdon/forge/forge_test.go | 2 ++
 vendor/github.com/brettlangdon/forge/scanner.go    | 4 ++++
 vendor/github.com/brettlangdon/forge/test.cfg      | 1 +
 3 files changed, 7 insertions(+)

$ # List current vendored dependencies
$ git vendor list
[email protected]:
	name:	forge
	dir:	vendor/github.com/brettlangdon/forge
	repo:	https://github.com/brettlangdon/forge
	ref:	v0.1.7
	commit:	071c5f108e0af39bf67a87fc766ea9bfb72b9ee7

git-vendor's People

Contributors

brettlangdon avatar aarondl avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.