浏览代码

Fix the CI

Vadim Markovtsev 6 年之前
父节点
当前提交
c6125a7372
共有 2 个文件被更改,包括 6 次插入4 次删除
  1. 3 3
      .appveyor.yml
  2. 3 1
      internal/plumbing/blob_cache.go

+ 3 - 3
.appveyor.yml

@@ -2,7 +2,7 @@ version: "{build}"
 platform: x64
 image: Visual Studio 2017
 
-clone_folder: c:\gopath\src\gopkg.in\src-d\hercules.v4
+clone_folder: c:\gopath\src\gopkg.in\src-d\hercules.v5
 
 environment:
   GOPATH: c:\gopath
@@ -17,10 +17,10 @@ build_script:
   - set PATH=C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;C:\msys64\usr\bin;C:\msys64\mingw64\bin;%PATH%
   - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
   - git clone --depth 1 --single-branch --branch %GOGIT_TAG% https://github.com/src-d/go-git %GOPATH%/src/gopkg.in/src-d/go-git.v4
-  - cd %GOPATH%\src\gopkg.in\src-d\hercules.v4
+  - cd %GOPATH%\src\gopkg.in\src-d\hercules.v5
   - set DISABLE_TENSORFLOW=1
   - make
-  - 7z a c:\gopath\src\gopkg.in\src-d\hercules.v4\hercules.win64.zip %GOPATH%\bin\hercules.exe
+  - 7z a c:\gopath\src\gopkg.in\src-d\hercules.v5\hercules.win64.zip %GOPATH%\bin\hercules.exe
 
 test_script:
   - go get -v -t -d gopkg.in/src-d/hercules.v5/...

+ 3 - 1
internal/plumbing/blob_cache.go

@@ -17,12 +17,13 @@ import (
 	"gopkg.in/src-d/hercules.v5/internal/core"
 )
 
-
+// ErrorBinary is raised in CachedBlob.CountLines() if the file is binary.
 var ErrorBinary = errors.New("binary")
 
 // CachedBlob allows to explicitly cache the binary data associated with the Blob object.
 type CachedBlob struct {
 	object.Blob
+	// Data is the read contents of the blob object.
 	Data []byte
 }
 
@@ -31,6 +32,7 @@ func (b *CachedBlob) Reader() (io.ReadCloser, error) {
 	return ioutil.NopCloser(bytes.NewReader(b.Data)), nil
 }
 
+// Cache reads the underlying blob object and sets CachedBlob.Data.
 func (b *CachedBlob) Cache() error {
 	reader, err := b.Blob.Reader()
 	if err != nil {