Skip to content

Rouden/VersioningUtils

Repository files navigation

CI

VersioningUtils

List version controlled file paths. Git and SVN are supported.

Unit tests are the main target of this project.

Usage

  1. Add NuGet package
dotnet add package Versioning.Utils
  1. Get file paths
string[] paths = await VersioningUtils.GetVersionedFiles();
Console.WriteLine(String.Join("\n", paths));
/*
C:/projects/VersioningUtils/.editorconfig
C:/projects/VersioningUtils/.github/workflows/ci.yml
C:/projects/VersioningUtils/.gitignore
C:/projects/VersioningUtils/LICENSE.txt
...
*/

Supported version control system

  • git
  • svn

Requirements

  • .NET Core 3.0 or later (.NET Standard 2.1)
  • Version control system client
    • git command if the target repo is git
    • svn command if the target repo is svn
  • Limitation with svn
    • This package ignores files where the path has non ASCII letters.
    • This package ignores missing files in your local workspace.

Tips

Other Utilities

  • VersioningUtils.FindTrojanLetters(...)

    // Sample unit test code:
    var exts = new string[]{".cs"};
    var list = await VersioningUtils.FindTrojanLetters(exts);
    Assert.True(0 == list.Count(), $"Trojan source(s) detected.\n{String.Join("\n----\n", list)}");

About

List version controlled file paths. Git and SVN are supported.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages