Skip to content

Commit 4eecbd8

Browse files
authored
Merge pull request libgit2#338 from libgit2/cmn/variable-subst
Use variable substitution instead of a wrapper script
2 parents 9af9dd3 + 7f426f2 commit 4eecbd8

File tree

5 files changed

+11
-24
lines changed

5 files changed

+11
-24
lines changed

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ sudo: required
55
install: ./script/install-libgit2.sh
66

77
go:
8-
- 1.1
9-
- 1.2
10-
- 1.3
11-
- 1.4
128
- 1.5
139
- 1.6
1410
- 1.7

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-libgit2:
55

66
test: build-libgit2
77
go run script/check-MakeGitError-thread-lock.go
8-
./script/with-static.sh go test ./...
8+
go test ./...
99

1010
install: build-libgit2
11-
./script/with-static.sh go install ./...
11+
go install ./...

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ to use a version of git2go which will work against libgit2 v0.22 and dynamically
2222

2323
import "github.com/libgit2/git2go"
2424

25-
to use the version which works against the latest release.
25+
to use the 'master' branch, which works against the latest release of libgit2, whichever that one is at the time.
2626

2727
### From `next`
2828

@@ -44,15 +44,14 @@ libgit2 uses OpenSSL and LibSSH2 for performing encrypted network connections. F
4444
Running the tests
4545
-----------------
4646

47-
For the stable version, `go test` will work as usual. For the `next` branch, similarly to installing, running the tests requires linking against the local libgit2 library, so the Makefile provides a wrapper
47+
For the stable version, `go test` will work as usual. For the `next` branch, similarly to installing, running the tests requires building a local libgit2 library, so the Makefile provides a wrapper that makes sure it's built
4848

4949
make test
5050

51-
Alternatively, if you want to pass arguments to `go test`, you can use the script that sets it all up
51+
Alternatively, you can build the library manually first and then run the tests
5252

53-
./script/with-static.sh go test -v
54-
55-
which will run the specified arguments with the correct environment variables.
53+
./script/build-libgit2-static.sh
54+
go test -v
5655

5756
License
5857
-------

git.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
package git
22

33
/*
4+
#cgo CFLAGS: -I${SRCDIR}/vendor/libgit2/include
5+
#cgo LDFLAGS: -L${SRCDIR}/vendor/libgit2/build/ -lgit2
6+
#cgo windows LDFLAGS: -lwinhttp
7+
#cgo !windows pkg-config: --static ${SRCDIR}/vendor/libgit2/build/libgit2.pc
48
#include <git2.h>
59
#include <git2/sys/openssl.h>
610

script/with-static.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)