Skip to content

Commit

Permalink
Merge branch 'issue/2'
Browse files Browse the repository at this point in the history
  • Loading branch information
cuisongliu committed Dec 4, 2020
2 parents 33e8274 + 9d9eef2 commit 4608f3d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,37 @@ https://download.docker.com/linux/static/stable/x86_64/docker-18.09.5.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-18.09.6.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-18.09.7.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-18.09.8.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-18.09.9.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.0.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.1.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.10.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.11.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.12.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.13.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.14.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.2.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.3.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.4.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.5.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.6.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.7.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.8.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-19.03.9.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-19.03.0.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-19.03.1.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-19.03.10.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-19.03.11.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-19.03.12.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-19.03.13.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-19.03.14.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-19.03.2.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-19.03.3.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-19.03.4.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-19.03.5.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-19.03.6.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-19.03.7.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-19.03.8.tgz
https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-19.03.9.tgz
```

the containerd Newest version is v1.2.7
Expand Down
9 changes: 6 additions & 3 deletions install/command/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
sealos "github.com/fanux/sealos/install"
"github.com/wonderivan/logger"
"os"
"strings"
"text/template"
)

Expand Down Expand Up @@ -189,14 +190,16 @@ oom_score = 0
}

func (d *Containerd) Print() {
urlPrefix := "https://github.com/containerd/containerd/releases/download/%s/containerd-%s-linux-amd64.tar.gz"
data, err := Asset("install/command/containerd.json")
if err != nil {
logger.Error(err)
}
var versions []string
_ = json.Unmarshal(data, &versions)
for _, v := range versions {
println(v)
vNoV := strings.ReplaceAll(v, "v", "")
println(fmt.Sprintf(urlPrefix, v, vNoV))
}
}

Expand All @@ -213,8 +216,8 @@ func (d *Containerd) Fetch() {
if data != nil {
_ = json.Unmarshal(data, &tagses)
if len(tagses) > 0 {
for j := 0; j < len(tagses); j++ {
versions = append(versions, tagses[j].Name)
for _, v := range tagses {
versions = append(versions, v.Name)
}
} else {
break
Expand Down

0 comments on commit 4608f3d

Please sign in to comment.