diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-15 15:26:06 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-15 15:27:46 +0200 |
commit | ab02aacdd6536ea1483b939f764c85cbe3f579e6 (patch) | |
tree | 23709ed8f8bd0c6fff3f8af48e2d641a569bfbd5 | |
parent | 0e4ebfa194efd6574c1ac6dc7e518b989fff5368 (diff) |
Avoid vendoring tooling as much as possible
-rw-r--r-- | Gopkg.lock | 28 | ||||
-rw-r--r-- | Gopkg.toml | 8 | ||||
-rwxr-xr-x | generate-vendor.sh | 20 |
3 files changed, 24 insertions, 32 deletions
@@ -1,42 +1,16 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - +# This was generated by ./generate-vendor.sh [[projects]] branch = "master" name = "golang.org/x/crypto" - packages = [ - "chacha20poly1305", - "internal/chacha20", - "poly1305", - "blake2s", - "curve25519" - ] revision = "1a580b3eff7814fc9b40602fd35256c63b50f491" [[projects]] branch = "master" name = "golang.org/x/net" - packages = [ - "bpf", - "internal/iana", - "internal/socket", - "ipv4", - "ipv6" - ] revision = "2491c5de3490fced2f6cff376127c667efeed857" [[projects]] branch = "master" name = "golang.org/x/sys" - packages = [ - "cpu", - "unix" - ] revision = "7c87d13f8e835d2fb3a70a2912c811ed0c1d241b" -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "831221f90003ef3b3b4e8277051718f6c8094b04a9cf42ebe02f25e8af866657" - solver-name = "gps-cdcl" - solver-version = 1 @@ -1,15 +1,13 @@ +# This was generated by ./generate-vendor.sh [[constraint]] branch = "master" name = "golang.org/x/crypto" [[constraint]] branch = "master" - name = "golang.org/x/sys" + name = "golang.org/x/net" [[constraint]] branch = "master" - name = "golang.org/x/net" + name = "golang.org/x/sys" -[prune] - go-tests = true - unused-packages = true diff --git a/generate-vendor.sh b/generate-vendor.sh new file mode 100755 index 0000000..51d0fff --- /dev/null +++ b/generate-vendor.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +echo "# This was generated by ./generate-vendor.sh" > Gopkg.lock +echo "# This was generated by ./generate-vendor.sh" > Gopkg.toml + +while read -r package; do + cat >> Gopkg.lock <<-_EOF + [[projects]] + branch = "master" + name = "$package" + revision = "$(< "$GOPATH/src/$package/.git/refs/heads/master")" + + _EOF + cat >> Gopkg.toml <<-_EOF + [[constraint]] + branch = "master" + name = "$package" + + _EOF +done < <(sed -n 's/.*"\(golang.org\/x\/[^/]\+\)\/\?.*".*/\1/p' *.go */*.go | sort | uniq) |