diff options
author | NOGISAKA Sadata | 2017-09-18 14:17:24 +0900 |
---|---|---|
committer | NOGISAKA Sadata | 2017-09-18 14:17:24 +0900 |
commit | 0067c3887768896d03700a015e3789e043021423 (patch) | |
tree | 7032f9161941a436cd380d404c0d53b8f03078ca | |
parent | 5da9611c0b7bc5b4182e92157468a055dacef5f8 (diff) | |
download | aur-0067c3887768896d03700a015e3789e043021423.tar.gz |
add url_test.go.patch for passing `go test` (this patch is backported from https://github.com/motemen/ghq/commit/7663e36798657347fc2a03890e70b84d95cc017f)
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 19 | ||||
-rw-r--r-- | url_test.go.patch | 21 |
3 files changed, 35 insertions, 9 deletions
@@ -1,7 +1,7 @@ pkgbase = ghq pkgdesc = Manage remote repository clones pkgver = 0.8.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/motemen/ghq arch = i686 arch = x86_64 @@ -10,7 +10,9 @@ pkgbase = ghq makedepends = git optdepends = zsh: ghq function for zsh source = ghq-0.8.0.tar.gz::https://github.com/motemen/ghq/archive/v0.8.0.tar.gz + source = url_test.go.patch sha512sums = 8b9e9f1d2445391700b91559c4c95968e26f083d5af50102d2bc05baa1f5b92a5d19b8bb3fbb2c48071ed20851a55b4bc8fc1ef60bcb299f04404a56fff15902 + sha512sums = 7ecb8ee1503e815f29626837420d1b52f72bc22bcd1254e5d3166d6b22aaf25e8a5bc1bcdde3d1ec7e71b33f03cbd28d4d68a9527f30d5d66081be08c9d65d5b pkgname = ghq @@ -3,30 +3,32 @@ pkgname=ghq pkgver=0.8.0 -pkgrel=1 +pkgrel=2 pkgdesc="Manage remote repository clones" arch=('i686' 'x86_64') url="https://github.com/motemen/ghq" license=('MIT') makedepends=('go' 'git') optdepends=('zsh: ghq function for zsh') -source=("ghq-${pkgver}.tar.gz::https://github.com/motemen/ghq/archive/v${pkgver}.tar.gz") +source=("ghq-${pkgver}.tar.gz::https://github.com/motemen/ghq/archive/v${pkgver}.tar.gz" + "url_test.go.patch") build() { - cd "$pkgname-$pkgver" + cd "$srcdir/$pkgname-$pkgver" export GOPATH="$srcdir/build" go get -t -d -v - go build + patch < ../url_test.go.patch + go build . } check() { - cd "$pkgname-$pkgver" + cd "$srcdir/$pkgname-$pkgver" export GOPATH="$srcdir/build" - go test + go test -x -v . } package() { - cd "$pkgname-$pkgver" + cd "$srcdir/$pkgname-$pkgver" install -Dm 755 ghq-$pkgver "$pkgdir/usr/bin/ghq" install -Dm 644 zsh/_ghq "$pkgdir/usr/share/zsh/site-functions/_ghq" install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/ghq/LICENSE" @@ -34,4 +36,5 @@ package() { # vim: set et sw=2 sts=2: -sha512sums=('8b9e9f1d2445391700b91559c4c95968e26f083d5af50102d2bc05baa1f5b92a5d19b8bb3fbb2c48071ed20851a55b4bc8fc1ef60bcb299f04404a56fff15902') +sha512sums=('8b9e9f1d2445391700b91559c4c95968e26f083d5af50102d2bc05baa1f5b92a5d19b8bb3fbb2c48071ed20851a55b4bc8fc1ef60bcb299f04404a56fff15902' + '7ecb8ee1503e815f29626837420d1b52f72bc22bcd1254e5d3166d6b22aaf25e8a5bc1bcdde3d1ec7e71b33f03cbd28d4d68a9527f30d5d66081be08c9d65d5b') diff --git a/url_test.go.patch b/url_test.go.patch new file mode 100644 index 000000000000..95ff363a6bfc --- /dev/null +++ b/url_test.go.patch @@ -0,0 +1,21 @@ +--- url_test.go.orig 2017-08-22 11:49:51.000000000 +0900 ++++ url_test.go 2017-09-18 14:13:08.087122344 +0900 +@@ -3,6 +3,7 @@ + import ( + . "github.com/onsi/gomega" + "net/url" ++ "os" + "testing" + ) + +@@ -36,8 +37,9 @@ + Expect(differentNameRepository.Host).To(Equal("github.com")) + Expect(err).To(BeNil()) + ++ os.Setenv("GITHUB_USER", "ghq-test") + sameNameRepository, err := NewURL("same-name-ghq") +- Expect(sameNameRepository.String()).To(Equal("https://github.com/same-name-ghq/same-name-ghq")) ++ Expect(sameNameRepository.String()).To(Equal("https://github.com/ghq-test/same-name-ghq")) + Expect(sameNameRepository.Host).To(Equal("github.com")) + Expect(err).To(BeNil()) + } |