-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
34 lines (28 loc) · 812 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package main
import (
"github.com/fejnartal/dependabosh/cli"
"github.com/fejnartal/dependabosh/deps"
"github.com/fejnartal/dependabosh/logs"
)
func main() {
dependabosh, err := cli.ParseArgs()
if err != nil {
logs.ErrorLogger.Println(err)
cli.PrintDefaults()
}
for _, dep := range dependabosh.Updates {
hasNewVersion, version, err := deps.CheckNewVersionAvailable(dep)
if err != nil {
logs.ErrorLogger.Println(err)
}
actualBlobName, err := deps.EvalPlaceholders(dep.NamePattern, dep)
if err != nil {
logs.ErrorLogger.Println(err)
}
if hasNewVersion {
logs.InfoLogger.Println("Needs bump: " + actualBlobName + ", From: " + dep.CurVersion + ", To: " + version)
} else {
logs.InfoLogger.Println("Up-to-date: " + actualBlobName + ", Version: " + dep.CurVersion)
}
}
}