diff --git a/core/core.go b/core/core.go index 2ad64fb..b661410 100644 --- a/core/core.go +++ b/core/core.go @@ -73,7 +73,7 @@ func (a *App) Run() error { log.Printf("Некорректный формат файла %s", parts[3]) continue } - if strings.HasSuffix(artifact, ".md5") || strings.HasSuffix(artifact, ".sha1") || strings.HasSuffix(artifact, ".sha256") || strings.HasSuffix(artifact, ".sha512") { + if fileParts[len(fileParts)-1] == "md5" || fileParts[len(fileParts)-1] == "sha1" || fileParts[len(fileParts)-1] == "sha256" || fileParts[len(fileParts)-1] == "sha512" { log.Printf("Пропускаем файл %s, так как он имеет расширение .md5, .sha1, .sha256 или .sha512", artifact) continue } diff --git a/repository/gitea/gitea.go b/repository/gitea/gitea.go index 6a40db9..2c6ba07 100644 --- a/repository/gitea/gitea.go +++ b/repository/gitea/gitea.go @@ -124,7 +124,7 @@ func (c *Client) UploadArtifact(groupId, artifactId, version, packaging string, } defer resp.Body.Close() if resp.StatusCode != http.StatusCreated { - log.Printf("Ошибка загрузки артефакта: %s", resp.Status) + log.Printf("Ошибка загрузки артеф��кта: %s", resp.Status) return fmt.Errorf("failed to upload artifact: %s", resp.Status) } log.Printf("Артефакт %s-%s-%s.%s загружен в репозиторий Gitea", groupId, artifactId, version, packaging)