File tree Expand file tree Collapse file tree 5 files changed +46
-16
lines changed Expand file tree Collapse file tree 5 files changed +46
-16
lines changed Original file line number Diff line number Diff line change 1
1
language : go
2
2
3
- sudo : required
4
-
5
- install : ./script/install-libgit2.sh
6
-
7
3
go :
8
4
- 1.5
9
5
- 1.6
10
6
- 1.7
11
7
- tip
12
8
9
+ script : make test-static
10
+
13
11
matrix :
14
12
allow_failures :
15
13
- go : tip
Original file line number Diff line number Diff line change 1
1
default : test
2
2
3
- build-libgit2 :
4
- ./script/build-libgit2-static.sh
5
-
6
3
test : build-libgit2
7
4
go run script/check-MakeGitError-thread-lock.go
8
5
go test ./...
9
6
10
7
install : build-libgit2
11
8
go install ./...
9
+
10
+ build-libgit2 :
11
+ ./script/build-libgit2-static.sh
12
+
13
+ static : build-libgit2
14
+ go run script/check-MakeGitError-thread-lock.go
15
+ go test --tags " static" ./...
16
+
17
+ install-static : build-libgit2
18
+ go install --tags " static" ./...
19
+
20
+ test-static : build-libgit2
21
+ go test --tags " static" ./...
Original file line number Diff line number Diff line change 1
1
package git
2
2
3
3
/*
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
8
4
#include <git2.h>
9
5
#include <git2/sys/openssl.h>
10
-
11
- #if LIBGIT2_VER_MAJOR != 0 || LIBGIT2_VER_MINOR != 25
12
- # error "Invalid libgit2 version; this git2go supports libgit2 v0.25"
13
- #endif
14
-
15
6
*/
16
7
import "C"
17
8
import (
Original file line number Diff line number Diff line change
1
+ // +build !static
2
+
3
+ package git
4
+
5
+ /*
6
+ #include <git2.h>
7
+ #cgo pkg-config: libgit2
8
+
9
+ #if LIBGIT2_VER_MAJOR != 0 || LIBGIT2_VER_MINOR != 25
10
+ # error "Invalid libgit2 version; this git2go supports libgit2 v0.25"
11
+ #endif
12
+
13
+ */
14
+ import "C"
Original file line number Diff line number Diff line change
1
+ // +build static
2
+
3
+ package git
4
+
5
+ /*
6
+ #cgo CFLAGS: -I${SRCDIR}/vendor/libgit2/include
7
+ #cgo LDFLAGS: -L${SRCDIR}/vendor/libgit2/build/ -lgit2
8
+ #cgo windows LDFLAGS: -lwinhttp
9
+ #cgo !windows pkg-config: --static ${SRCDIR}/vendor/libgit2/build/libgit2.pc
10
+ #include <git2.h>
11
+
12
+ #if LIBGIT2_VER_MAJOR != 0 || LIBGIT2_VER_MINOR != 25
13
+ # error "Invalid libgit2 version; this git2go supports libgit2 v0.25"
14
+ #endif
15
+
16
+ */
17
+ import "C"
You can’t perform that action at this time.
0 commit comments