This repository was archived by the owner on Apr 15, 2023. It is now read-only.
File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -19,3 +19,4 @@ Below you find a list with all required and optional variables.
19
19
### Optional
20
20
21
21
- ** DISCORD_WEBHOOK_URL** : Discord webhook url for announcements
22
+ - ** VERSION_FIX** : If the watchdog fails cause the repository is already on the latest version set this variable to the latest version
Original file line number Diff line number Diff line change @@ -13,8 +13,13 @@ var latestVersionProceeded map[string]string
13
13
14
14
func main () {
15
15
latestVersionProceeded = map [string ]string {}
16
+ versionFill , err := semver .Make (os .Getenv ("VERSION_FIX" ))
17
+ if err != nil {
18
+ logrus .Error (err )
19
+ }
20
+ latestVersionProceeded [fmt .Sprintf ("%d.%d" , versionFill .Major , versionFill .Minor )] = versionFill .String ()
16
21
17
- err : = gitSetupCredentials ()
22
+ err = gitSetupCredentials ()
18
23
if err != nil {
19
24
logrus .Panic (err )
20
25
}
@@ -46,6 +51,7 @@ func checkVersion() {
46
51
versions = append (versions , v )
47
52
}
48
53
semver .Sort (versions )
54
+ logrus .Debug ("Available versions from Factorio.com " , versions )
49
55
50
56
// Filter only latest version based on minor
51
57
var lastVersion semver.Version
@@ -62,9 +68,9 @@ func checkVersion() {
62
68
} else if i + 1 == len (versions ) {
63
69
lastVersions = append (lastVersions , version )
64
70
}
65
-
66
71
lastVersion = version
67
72
}
73
+ logrus .Info ("last version of each major" , lastVersions )
68
74
69
75
// Remove all tags which are published on docker
70
76
tags , err := getTags ()
You can’t perform that action at this time.
0 commit comments