Skip to content

Commit

Permalink
perf: support uploading .tar.gz format image package (#1852)
Browse files Browse the repository at this point in the history
* perf: support uploading .tar.gz format image package

Signed-off-by: 张启航 <[email protected]>

* fix: change get version

Signed-off-by: 张启航 <[email protected]>

---------

Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail authored Jan 18, 2024
1 parent 6627240 commit e059649
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion builder/parser/docker_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ func ShowVersion(module string) {

// GetVersion GetVersion
func GetVersion() string {
return "test"
return version
}

0 comments on commit e059649

Please sign in to comment.