Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oneofone/git-go-vendor
Simple go vendoring using git submodules.
https://github.com/oneofone/git-go-vendor
Last synced: about 5 hours ago
JSON representation
Simple go vendoring using git submodules.
- Host: GitHub
- URL: https://github.com/oneofone/git-go-vendor
- Owner: OneOfOne
- Created: 2017-10-12T18:52:31.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-24T01:50:51.000Z (about 7 years ago)
- Last Synced: 2024-06-20T11:15:15.634Z (5 months ago)
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 12
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git-go-vendor [![GoDoc](https://godoc.org/github.com/OneOfOne/git-go-vendor?status.svg)](https://godoc.org/github.com/OneOfOne/git-go-vendor)
A "super" simple git sub command to use vendor go packages using git submodule (which is automatically supported by go get).
## Install
1. `go get github.com/OneOfOne/git-go-vendor`
2. Make sure `$GOPATH/bin` is in your `$PATH`.
3. `git go-vendor -h`## Usage
```
━➤ git go-vendor -h
NAME:
git-go-vendor - Simple vendoring using git submodules.USAGE:
git-go-vendor [global options] command [command options] [arguments...]VERSION:
v0.1COMMANDS:
list, ls list all current directly vendored packages
add, a adds or replaces a vendor package {git-repo}[@branch|tag|hash] [alias]
update, up updates a vendored package or all of them if non is specified
remove, rm removes the vendor package
help, h Shows a list of commands or help for one commandGLOBAL OPTIONS:
--verbose, -v verbose output (default: false)
--dry-run, -n dry-run, don't actually execute any git commands (default: false)
--git-path value, --git value path to the git executable (default: "git")
--help, -h show help (default: false)
--version, -V print the version (default: false)
```## Example
```
━➤ git go-vendor a github.com/OneOfOne/xxhash@449a3a6b
* Added vendor/github.com/OneOfOne/xxhash @ v1.2-14-g449a3a6bec━➤ git go-vendor ls
* vendor/github.com/OneOfOne/xxhash @ v1.2-14-g449a3a6bec━➤ git go-vendor rm github.com/OneOfOne/xxhash
* Removed vendor/github.com/OneOfOne/xxhash━➤ git go-vendor a github.com/OneOfOne/xxhash@449a3a6b github.com/OneOfOne/xxh
* Added github.com/OneOfOne/xxhash @ v1.2-14-g449a3a6bec → vendor/github.com/OneOfOne/xxh
━➤ git go-vendor ls
* github.com/OneOfOne/xxhash @ v1.2-14-g449a3a6bec → vendor/github.com/OneOfOne/xxh━➤ git commit -a -m 'xxh vendoring'
```
## FAQ
### Why
* Everything else is too complicated and depends on having the vendoring tool installed on the client.
* Managing extra config files overcomplicates vendoring.
* 90% of my use cases depends on using a git repo.## TODO
* Look into supporting non-git repos.
## License
This project is released under the [MIT](https://opensource.org/licenses/MIT) license.