mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-29 18:27:58 +08:00
perf: support uploading .tar.gz format image package (#1852)
* perf: support uploading .tar.gz format image package Signed-off-by: 张启航 <101104760+ZhangSetSail@users.noreply.github.com> * fix: change get version Signed-off-by: 张启航 <101104760+ZhangSetSail@users.noreply.github.com> --------- Signed-off-by: 张启航 <101104760+ZhangSetSail@users.noreply.github.com>
This commit is contained in:
parent
6627240878
commit
e0596497e5
@ -101,7 +101,7 @@ func (d *DockerRunOrImageParse) Parse() ParseErrorList {
|
||||
tarPath := path.Join("/grdata/package_build/temp/events", eventID)
|
||||
files, _ := filepath.Glob(path.Join(tarPath, "*"))
|
||||
if len(files) == 1 {
|
||||
if !strings.HasSuffix(files[0], ".tar") {
|
||||
if !strings.HasSuffix(files[0], ".tar") && !strings.HasSuffix(files[0], ".tar.gz") {
|
||||
d.errappend(ErrorAndSolve(FatalError, fmt.Sprintf("文件格式不正确"), SolveAdvice("modify_image", "请确认上传的文件格式是否正确")))
|
||||
return d.errors
|
||||
}
|
||||
|
@ -37,5 +37,5 @@ func ShowVersion(module string) {
|
||||
|
||||
// GetVersion GetVersion
|
||||
func GetVersion() string {
|
||||
return "test"
|
||||
return version
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user