Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add nightly/ prefix for OS images #13

Merged
merged 1 commit into from
Aug 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion map.go
Original file line number Diff line number Diff line change
@@ -115,6 +115,10 @@ func loadMapJSON(f io.Reader) (map[string]string, error) {

var sb strings.Builder

if file.Repository == "os" {
sb.WriteString("nightly/")
}

sb.WriteString(file.BoardSlug)
sb.WriteString("/")
sb.WriteString(distroCaser.String(file.DistroRelease))
@@ -147,6 +151,7 @@ func loadMapJSON(f io.Reader) (map[string]string, error) {
sb.WriteString("-oowow")
}

// Add board into the map without an extension
if strings.HasSuffix(file.Extension, "img.xz") {
m[sb.String()] = u.Path
}
@@ -163,7 +168,7 @@ func loadMapJSON(f io.Reader) (map[string]string, error) {
sb.WriteString(file.Extension)
}

m[sb.String()] = u.Path
m[sb.String()] = u.Path // Add board into the map with an extension
}

return m, nil

Unchanged files with check annotations Beta

return true, nil
}
type VersionCheck struct {

Check failure on line 230 in check.go

GitHub Actions / build

exported type VersionCheck should have comment or be unexported
config *Config
VersionURL string
lastVersion string
return v.lastVersion, nil
}
func (v *VersionCheck) Check(server *Server, logFields log.Fields) (bool, error) {

Check failure on line 270 in check.go

GitHub Actions / build

exported method VersionCheck.Check should have comment or be unexported
currentVersion, err := v.getCurrentVersion()
if err != nil {
}
}
func Remove[V comparable](collection []V, value V) []V {

Check failure on line 81 in config.go

GitHub Actions / build

exported function Remove should have comment or be unexported
return lo.Filter(collection, func(item V, _ int) bool {
return item != value
})
}
return true
} else {

Check failure on line 83 in servers.go

GitHub Actions / build

if block ends with a return statement, so drop this else and outdent its block
log.WithFields(logFields).Debug("Server is still unavailable")
}