|
5 | 5 | We use v0.23.4 because v0.24 sucks
|
6 | 6 |
|
7 | 7 | ```shell
|
8 |
| -$ wget https://github.com/libgit2/libgit2/archive/v0.23.4.zip |
9 |
| -$ unzip v0.23.4.zip |
| 8 | +cp devtools/libgit2.rb.patch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula |
| 9 | +cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula |
| 10 | +git apply libgit2.rb.patch && git add libgit2.rb && git commit -m "patch libgit2 version for eru-core" && rm libgit2.rb.patch |
| 11 | +cd - |
10 | 12 | ```
|
11 |
| -Install dependencies: `libssh2`, `http-parser`, `cmake`, `libcurl`. |
12 | 13 |
|
13 |
| -```shell |
14 |
| -On Mac OSX: |
15 |
| -$ brew install libssh2 http-parser cmake libcurl |
16 |
| - |
17 |
| -On CentOS: |
18 |
| -$ yum install libssh2-devel http-parser cmake libcurl-devel |
19 |
| -``` |
20 |
| -Then install libgit2. |
21 |
| - |
22 |
| -```shell |
23 |
| -$ cmake . -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DUSE_SSH=YES |
24 |
| -$ make && make install |
25 |
| -``` |
26 |
| -Note on Mac OSX may need to set CFLAGS="-std=c99". |
27 |
| -Now libgit2 is installed under `/usr/local/lib` as default. We still need to set pkg-config and link dynamic libraries. |
| 14 | +## setup dev environment |
28 | 15 |
|
29 | 16 | ```shell
|
30 |
| -On Mac OSX: |
31 |
| -$ cd /usr/local/lib/pkgconfig |
32 |
| -$ ln -s /path/to/libgit2/pkgconfig/libgit2.pc libgit2.pc |
33 |
| -$ cd /usr/local/lib |
34 |
| -$ ln -s /path/to/libgit2/libgit2.23.dylib libgit2.23.dylib |
35 |
| - |
36 |
| -On CentOS: |
37 |
| -$ cd /usr/lib64/pkgconfig/ |
38 |
| -$ ln -s /usr/local/lib/pkgconfig/libgit2.pc libgit2.pc |
39 |
| -$ cd /usr/lib64 |
40 |
| -$ ln -s /usr/local/lib/libgit2.so.23 libgit2.so.23 |
| 17 | +git config --global url."git@gitlab.ricebook.net:".insteadOf "https://gitlab.ricebook.net/" |
| 18 | +go get gitlab.ricebook.net/platform/core.git |
| 19 | +mv $GOPATH/src/gitlab.ricebook.net/platform/core.git $GOPATH/src/gitlab.ricebook.net/platform/core |
| 20 | +cd $GOPATH/src/gitlab.ricebook.net/platform/core |
| 21 | +make deps |
| 22 | +make build |
41 | 23 | ```
|
42 | 24 |
|
43 |
| -## setup dev environment |
| 25 | +## Upgrade core on test/production server |
44 | 26 |
|
45 | 27 | ```shell
|
46 |
| -$ git config --global url."git@gitlab.ricebook.net:".insteadOf "https://gitlab.ricebook.net/" |
47 |
| -$ go get gitlab.ricebook.net/platform/core.git |
48 |
| -$ mv $GOPATH/src/gitlab.ricebook.net/platform/core.git $GOPATH/src/gitlab.ricebook.net/platform/core |
49 |
| -$ cd $GOPATH/src/gitlab.ricebook.net/platform/core && go install |
50 |
| -$ ln -s $GOPATH/src/gitlab.ricebook.net/platform/core $MY_WORK_SPACE/eru-core2 |
51 |
| -$ make deps |
| 28 | +make build |
| 29 | +# test server |
| 30 | +devtools/upgrade-eru-core.sh test eru-core |
| 31 | +# prod server |
| 32 | +devtools/upgrade-eru-core.sh |
52 | 33 | ```
|
53 | 34 |
|
54 | 35 | ### GRPC
|
|
0 commit comments