File tree Expand file tree Collapse file tree 4 files changed +24
-26
lines changed Expand file tree Collapse file tree 4 files changed +24
-26
lines changed Original file line number Diff line number Diff line change
1
+ default : test
2
+
3
+ build-libgit2 :
4
+ ./script/build-libgit2-static.sh
5
+
6
+ update-libgit2 :
7
+ cd vendor/libgit2 && \
8
+ git fetch origin development && \
9
+ git checkout -qf FETCH_HEAD
10
+
11
+ test : build-libgit2
12
+ ./script/with-static.sh go test ./...
13
+
14
+ install : build-libgit2
15
+ ./script/with-static.sh go install ./...
Original file line number Diff line number Diff line change 2
2
3
3
set -ex
4
4
5
+ VENDORED_PATH=vendor/libgit2
6
+
5
7
# Make sure we have the latest libgit2
6
- if [ -d libgit2 ]; then
7
- cd libgit2
8
- git fetch origin development
9
- git checkout FETCH_HEAD
10
- cd ..
11
- else
12
- git clone --depth 1 --single-branch git://github.com/libgit2/libgit2 libgit2
8
+ if [ ! -d $VENDORED_PATH ]; then
9
+ git clone --depth 1 --single-branch git://github.com/libgit2/libgit2 $VENDORED_PATH
13
10
fi
14
11
15
- cd libgit2
12
+ cd $VENDORED_PATH
13
+
16
14
cmake -DTHREADSAFE=ON \
17
15
-DBUILD_CLAR=OFF \
18
16
-DBUILD_SHARED_LIBS=OFF \
19
- -DCMAKE_INSTALL_PREFIX=$PWD /install \
17
+ -DCMAKE_INSTALL_PREFIX=.. /install \
20
18
.
21
19
22
20
make install
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
3
3
set -ex
4
4
5
- export LIBGIT2_LOCATION=$PWD /libgit2/install
6
- export PKG_CONFIG_PATH=$LIBGIT2_LOCATION /lib/pkgconfig
7
- export LIBGIT2_A=$LIBGIT2_LOCATION /lib/libgit2.a
8
- export CGO_LDFLAGS=" $LIBGIT2_A $( pkg-config --static --libs libgit2) "
5
+ export INSTALL_LOCATION=$PWD /vendor/install
6
+ export PKG_CONFIG_PATH=$INSTALL_LOCATION /lib/pkgconfig
9
7
10
8
$@
You can’t perform that action at this time.
0 commit comments