This repository was archived by the owner on Apr 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 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.
1919### Optional
2020
2121- ** 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
1313
1414func main () {
1515 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 ()
1621
17- err : = gitSetupCredentials ()
22+ err = gitSetupCredentials ()
1823 if err != nil {
1924 logrus .Panic (err )
2025 }
@@ -46,6 +51,7 @@ func checkVersion() {
4651 versions = append (versions , v )
4752 }
4853 semver .Sort (versions )
54+ logrus .Debug ("Available versions from Factorio.com " , versions )
4955
5056 // Filter only latest version based on minor
5157 var lastVersion semver.Version
@@ -62,9 +68,9 @@ func checkVersion() {
6268 } else if i + 1 == len (versions ) {
6369 lastVersions = append (lastVersions , version )
6470 }
65-
6671 lastVersion = version
6772 }
73+ logrus .Info ("last version of each major" , lastVersions )
6874
6975 // Remove all tags which are published on docker
7076 tags , err := getTags ()
You can’t perform that action at this time.
0 commit comments