Skip to content
This repository was archived by the owner on Apr 15, 2023. It is now read-only.

Commit 6c68e75

Browse files
committed
skip versions which are unavailable
1 parent c01c0a2 commit 6c68e75

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

factorio-docker-watchdog.go

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,26 @@ func checkVersion() {
107107
if err != nil {
108108
logrus.Panicln(err)
109109
}
110-
version := BuildInfoVersion{
111-
SHA1: checksum,
112-
Tags: []string{
113-
stableVersion.String(),
114-
"stable",
115-
},
110+
if checksum != "" {
111+
version := BuildInfoVersion{
112+
SHA1: checksum,
113+
Tags: []string{
114+
stableVersion.String(),
115+
"stable",
116+
},
117+
}
118+
buildinfo.Versions[stableVersion.String()] = version
116119
}
117-
buildinfo.Versions[stableVersion.String()] = version
118120
}
119121

120122
checksum, err := checks.getChecksum(v)
121123
if err != nil {
122124
logrus.Panicln(err)
123125
}
126+
if checksum == "" {
127+
continue
128+
}
129+
124130
version := BuildInfoVersion{
125131
SHA1: checksum,
126132
Tags: []string{

0 commit comments

Comments
 (0)