From 89f18839771a589cc4750896f9f6b42768162508 Mon Sep 17 00:00:00 2001 From: Ben van B <030@users.noreply.github.com> Date: Sat, 10 Feb 2024 10:28:05 +0100 Subject: [PATCH] feat: [#459] Display how long N3DR was running. (#475) --- Taskfile.yml | 2 +- build/package/snap/snapcraft.yaml | 2 +- cmd/n3dr/root.go | 5 +++++ docs/CHANGELOG.md | 19 +++++++++++++++++-- docs/quickstarts/snippets/n3dr/DOWNLOAD.md | 6 +++--- .../n3dr/artifactsv2/count/artifacts_test.go | 2 -- .../n3dr/artifactsv2/upload/upload_test.go | 2 -- .../n3dr/config/repository/repository_test.go | 2 -- .../n3dr/config/security/anonymous_test.go | 2 -- 9 files changed, 27 insertions(+), 15 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index d5371dd5..498dc091 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -4,7 +4,7 @@ version: '3' env: GIT_CHGLOG_URL: https://github.com/git-chglog/git-chglog/releases/download GIT_CHGLOG_VERSION: v0.15.1/git-chglog_0.15.1_linux_amd64.tar.gz - CHANGELOG_NEXT_TAG: 7.4.1 + CHANGELOG_NEXT_TAG: 7.5.0 tasks: changelog: diff --git a/build/package/snap/snapcraft.yaml b/build/package/snap/snapcraft.yaml index 3cc378c3..446ca71f 100644 --- a/build/package/snap/snapcraft.yaml +++ b/build/package/snap/snapcraft.yaml @@ -1,7 +1,7 @@ --- name: n3dr base: core22 -version: 7.4.1 +version: 7.5.0 summary: Nexus3 Disaster Recovery description: | Download all artifacts at once or migrate automatically from Nexus to Nexus. diff --git a/cmd/n3dr/root.go b/cmd/n3dr/root.go index 245f3425..a6f3c9c0 100644 --- a/cmd/n3dr/root.go +++ b/cmd/n3dr/root.go @@ -8,6 +8,7 @@ import ( "net/http" "os" "path/filepath" + "time" "github.com/030/logging/pkg/logging" cli "github.com/030/n3dr/internal/app/n3dr/artifactsv2" @@ -58,10 +59,14 @@ Nexus3 repository and restoring them.`, } func execute() { + now := time.Now() + if err := rootCmd.Execute(); err != nil { fmt.Println(err) os.Exit(1) } + + log.Infof("n3dr was running for: '%s'", time.Since(now)) } func init() { diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index a87014f1..285ec09d 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,10 +2,24 @@ ## [Unreleased] + +## [7.5.0] - 2024-02-10 +### Build +- **deps:** bump github.com/aws/aws-sdk-go from 1.50.10 to 1.50.14 ([#474](https://github.com/030/n3dr/issues/474)) +- **deps:** bump schubergphilis/mcvs-golang-action from 0.2.3 to 0.3.0 ([#473](https://github.com/030/n3dr/issues/473)) +- **deps:** bump golang from 1.21.6-alpine3.18 to 1.22.0-alpine3.18 ([#471](https://github.com/030/n3dr/issues/471)) +- **deps:** bump github.com/aws/aws-sdk-go from 1.50.5 to 1.50.10 ([#464](https://github.com/030/n3dr/issues/464)) +- **deps:** bump github.com/go-openapi/validate from 0.22.4 to 0.23.0 ([#465](https://github.com/030/n3dr/issues/465)) +- **deps:** bump github.com/docker/docker from 20.10.24+incompatible to 20.10.27+incompatible ([#466](https://github.com/030/n3dr/issues/466)) + +### Feat +- [[#459](https://github.com/030/n3dr/issues/459)] Display how long N3DR was running. + + ## [7.4.1] - 2024-02-04 ### Build -- Resolve 'GLIBC_2.34 not found in snapcraft' issue. +- [[#467](https://github.com/030/n3dr/issues/467)] Resolve 'GLIBC_2.34 not found in snapcraft' issue. ([#468](https://github.com/030/n3dr/issues/468)) @@ -460,7 +474,8 @@ The `backup`, `upload` and `repositories` commands have been removed. ## 1.0.0 - 2019-05-12 -[Unreleased]: https://github.com/030/n3dr/compare/7.4.1...HEAD +[Unreleased]: https://github.com/030/n3dr/compare/7.5.0...HEAD +[7.5.0]: https://github.com/030/n3dr/compare/7.4.1...7.5.0 [7.4.1]: https://github.com/030/n3dr/compare/7.4.0...7.4.1 [7.4.0]: https://github.com/030/n3dr/compare/7.3.3...7.4.0 [7.3.3]: https://github.com/030/n3dr/compare/7.3.2...7.3.3 diff --git a/docs/quickstarts/snippets/n3dr/DOWNLOAD.md b/docs/quickstarts/snippets/n3dr/DOWNLOAD.md index 798a4790..00bb93d1 100644 --- a/docs/quickstarts/snippets/n3dr/DOWNLOAD.md +++ b/docs/quickstarts/snippets/n3dr/DOWNLOAD.md @@ -1,12 +1,12 @@ # Download -Download the [latest N3DR binary](https://github.com/030/n3dr/releases/tag/7.4.1): +Download the [latest N3DR binary](https://github.com/030/n3dr/releases/tag/7.5.0): ```bash cd /tmp && \ -curl -L https://github.com/030/n3dr/releases/download/7.4.1/n3dr-ubuntu-latest \ +curl -L https://github.com/030/n3dr/releases/download/7.5.0/n3dr-ubuntu-latest \ -o n3dr-ubuntu-latest && \ -curl -L https://github.com/030/n3dr/releases/download/7.4.1/\ +curl -L https://github.com/030/n3dr/releases/download/7.5.0/\ n3dr-ubuntu-latest.sha512.txt \ -o n3dr-ubuntu-latest.sha512.txt && \ sha512sum -c n3dr-ubuntu-latest.sha512.txt && \ diff --git a/internal/app/n3dr/artifactsv2/count/artifacts_test.go b/internal/app/n3dr/artifactsv2/count/artifacts_test.go index 5af6cb5a..0c3086f6 100644 --- a/internal/app/n3dr/artifactsv2/count/artifacts_test.go +++ b/internal/app/n3dr/artifactsv2/count/artifacts_test.go @@ -1,5 +1,3 @@ -//go:build !integration - package count import ( diff --git a/internal/app/n3dr/artifactsv2/upload/upload_test.go b/internal/app/n3dr/artifactsv2/upload/upload_test.go index 4861eccf..a5a3311f 100644 --- a/internal/app/n3dr/artifactsv2/upload/upload_test.go +++ b/internal/app/n3dr/artifactsv2/upload/upload_test.go @@ -1,5 +1,3 @@ -//go:build !integration - package upload import ( diff --git a/internal/app/n3dr/config/repository/repository_test.go b/internal/app/n3dr/config/repository/repository_test.go index 754f46cf..37e02c23 100644 --- a/internal/app/n3dr/config/repository/repository_test.go +++ b/internal/app/n3dr/config/repository/repository_test.go @@ -1,5 +1,3 @@ -//go:build !integration - package repository import ( diff --git a/internal/app/n3dr/config/security/anonymous_test.go b/internal/app/n3dr/config/security/anonymous_test.go index a735374f..07fe7392 100644 --- a/internal/app/n3dr/config/security/anonymous_test.go +++ b/internal/app/n3dr/config/security/anonymous_test.go @@ -1,5 +1,3 @@ -//go:build !integration - package security import (