mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 03:37:46 +08:00
fix: re-examine the language after the build (#1258)
Co-authored-by: Quyc <qyc@QycMacBook-Pro.local>
This commit is contained in:
parent
e501ed3ddd
commit
7d20f254f2
@ -22,6 +22,7 @@ import (
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"runtime"
|
||||
@ -206,10 +207,19 @@ func (d *SourceCodeParse) Parse() ParseErrorList {
|
||||
return nil
|
||||
}
|
||||
packageFunc :=func() ParseErrorList{
|
||||
csi.RepositoryURL = buildInfo.RepostoryURL
|
||||
var checkPath string
|
||||
checkPath = buildInfo.RepostoryURL
|
||||
pathSplit := strings.Split(buildInfo.RepostoryURL,"/")
|
||||
eventID := pathSplit[len(pathSplit)-1]
|
||||
buildInfo.CodeHome = fmt.Sprintf("/grdata/package_build/temp/events/%s",eventID)
|
||||
files, err := ioutil.ReadDir(checkPath)
|
||||
if err != nil {
|
||||
logrus.Warn("check package error", err)
|
||||
}
|
||||
if len(files) == 0 {
|
||||
// 第一次上传在临时目录下检测
|
||||
checkPath = fmt.Sprintf("/grdata/package_build/temp/events/%s", eventID)
|
||||
}
|
||||
buildInfo.CodeHome = checkPath
|
||||
return ParseErrorList{}
|
||||
}
|
||||
ossFunc := func() ParseErrorList {
|
||||
|
Loading…
Reference in New Issue
Block a user