Skip to content
master
Go to file
Code

Latest commit

* fix(cli): Exit with <> 0 in case of failure

This commit is relevant for `CollaborationPlatformCommand`.

In many locations exceptions were being swallowed inappropriately. This
resulted in nukeeper running for a very long time as its current
behavior is to not stop until it can apply 1 update.

I've ensured that each separate repository gets a chance to run in case
of a multiple repository update command; single repository commands on
the other hand will now fail as soon as one of its update sets cannot be
applied.

The reasoning for this is the following: an error at the level of an
update set being applied is most likely going to happen for all the
different update sets. It is after all working with the same git
repository, target repository,... For example, if a push fails due to an
authentication issue, it will happen for all update sets.

After all repositories have had their chance and at least one of them
fails, an exception is throw that will result in a non-zero status code
being returned to process that invoked nukeeper.

`ICollaborationEngine` returns an integer, but this represents the
number of updates it has performed, and since there's no easy way to know
what the expected number of updates is at this point, there's no way to
utilize this information to be able to tell whether
`CollaborationPlatformCommand` should return a non-zero status code.

* test: Fix random test from failing

This test was failing because there's no longer a try/catch statement.
After using a substitute for the `INuKeeperLogger` in `Folder` instead
of null, it is passing again.

* tests: Verify repositories are run independently

Verify that each repository gets its chance to run regardless of an
unhandled exception for one that runs earlier.

I've added tests in `CollaborationEngineTests` for this. I would like to
refactor the existing tests towards using `SetUp` as I think it adds
clarity and reduces code duplication.

* fix: Ensure delete of repo folder

After removing the try/catch statement from `RepositoryUpdater.Run`, in
case of an exception it would be possible the folder cleanup code would
not run.

Add a try/finally statement to ensure that this cleanup always occurs.
4c71eeb

Git stats

Files

Permalink
Failed to load latest commit information.

README.md

Build Status Gitter NuGet Azure DevOps coverage

NuKeeper docsInstallationGetting startedRecipesDebugging

👀 Check out nukeeper.com to get started with NuKeeper 👀

NuKeeper

Automagically update NuGet packages in all .NET projects.

Installation

Installation is very easy. Just run this command and the tool will be installed.

Install: dotnet tool install nukeeper --global

Note: NuKeeper has experimental support for running package updates on Linux/macOS. This functionality relies on Mono installation on local system. Please refer to https://www.mono-project.com/ for more information about how to install mono.

Platform support

NuKeeper works for .NET Framework and for .NET Core projects. It also has the ability to target private NuGet feeds.

.NET Framework .NET Core Private Nuget Feed
✔️ ✔️ ✔️

Integration with the following platforms is supported.

Github AzureDevOps BitBucket GitLab Gitea
✔️ ✔️ ✔️ ✔️ ✔️

Commands

NuKeeper has different commands and options which can be utilized. Below you'll find a summary of all the commands and what they do.

Options:
  --version     Show version information
  -?|-h|--help  Show help information

Commands:
  global        Performs version checks and generates pull requests for all repositories the provided token can access.
  inspect       Checks projects existing locally for possible updates.
  org           Performs version checks and generates pull requests for all repositories in a github organisation.
  repo          Performs version checks and generates pull requests for a single repository.
  update        Applies relevant updates to a local project.

For detailed information about the commands, please check out the wiki

How To Uninstall

You can uninstall the tool using the following command.

dotnet tool uninstall nukeeper --global

How To Build and Run From Source

You can install the nukeeper dotnet tool of current build using the InstallNuKeeperDotNetTool (.bat for Windows, .sh for macOS and Linux) found in the root of the repository.

Note: this overrides your existing global installation of the NuKeeper dotnet tool.

You can build and package the tool using the following commands. The instructions assume that you are in the root of the repository.

dotnet pack .\NuKeeper\NuKeeper.csproj -o ".\artifacts"
dotnet tool install nukeeper --global --add-source ".\artifacts"
nukeeper --version

Note: On macOS and Linux, .\NuKeeper\NuKeeper.csproj and .\artifacts will need be switched to ./NuKeeper/NuKeeper.csproj and ./artifacts to accommodate for the different slash directions.

Licensing

NuKeeper is licensed under the Apache License

Acknowledgements

Logos by area55, licensed under a Creative Commons Attribution 4.0 International License.

You can’t perform that action at this time.