diff --git a/CHANGELOG.md b/CHANGELOG.md index eecf6d82..7a1f2924 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [6.0.11] - 2021-05-28 + +### Fixed + +- Some repositories were not backed up while using the `repositories` command. + ## [6.0.10] - 2021-04-12 ### Fixed @@ -531,7 +537,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Download all artifacts from a certain Nexus3 repository. -[Unreleased]: https://github.com/030/n3dr/compare/6.0.10...HEAD +[Unreleased]: https://github.com/030/n3dr/compare/6.0.11...HEAD +[6.0.11]: https://github.com/030/n3dr/compare/6.0.10...6.0.11 [6.0.10]: https://github.com/030/n3dr/compare/6.0.9...6.0.10 [6.0.9]: https://github.com/030/n3dr/compare/6.0.8...6.0.9 [6.0.8]: https://github.com/030/n3dr/compare/6.0.7...6.0.8 diff --git a/build/package/snap/snapcraft.yaml b/build/package/snap/snapcraft.yaml index 1283699d..d6586f96 100644 --- a/build/package/snap/snapcraft.yaml +++ b/build/package/snap/snapcraft.yaml @@ -1,7 +1,7 @@ --- name: n3dr base: core -version: 6.0.10 +version: 6.0.11 summary: Nexus3 Disaster Recovery description: | Download all artifacts at once or migrate automatically from Nexus to Nexus. diff --git a/internal/artifacts/npm.go b/internal/artifacts/npm.go index 8415ffae..c88f1c0e 100644 --- a/internal/artifacts/npm.go +++ b/internal/artifacts/npm.go @@ -17,6 +17,7 @@ import ( ) func (n *Nexus3) BackupAllNPMArtifacts(repository, dir, regex string) error { + log.Infof("Backing up: '%v'", n.Repository) url := n.URL + "/service/rest/repository/browse/" + repository npmRepoHTML, err := n.npmURL(url) if err != nil { diff --git a/internal/artifacts/repositories.go b/internal/artifacts/repositories.go index c3e931d6..f44b7a5b 100644 --- a/internal/artifacts/repositories.go +++ b/internal/artifacts/repositories.go @@ -83,21 +83,20 @@ func (n *Nexus3) repositoriesChannel(m repositoriesNamesAndFormatsMap, dir, rege errs := make(chan error) for name, format := range m { - log.Debugf("Name: '%v'. Format: '%v'", name, format) + n.Repository = name + log.Infof("Name: '%s'. Format: '%s'", n.Repository, format) - go func(dir, format, name string) { + go func(dir, format string, n Nexus3) { switch format { case "maven2": - n.Repository = name - log.Debugf("Repository: '%v'", n.Repository) errs <- n.StoreArtifactsOnDiskChannel(dir, regex) case "npm": - errs <- n.BackupAllNPMArtifacts(name, dir, regex) + errs <- n.BackupAllNPMArtifacts(n.Repository, dir, regex) default: - log.Warnf("Nexus repository: '%s', format: '%v' download not supported", name, format) + log.Warnf("Nexus repository: '%s', format: '%v' download not supported", n.Repository, format) errs <- nil } - }(dir, format, name) + }(dir, format, *n) } for range m { if err := <-errs; err != nil {