Skip to content

GitSources.Tools

This is a specific tool designed to help build deployment packages within an automated build process when using GIT. It is published to https://www.nuget.org and can easily be installed into a dotnet SDK using the command below:

dotnet tool install --global GitSources.Tool --version 1.*

Using GitSources.Tools

To use this tool you need a deployment file generated from DataStar. This deployment file contains the Commit Sha for each script that needs to be included in a built deployment package. The utility will process the contents of the deployment file and each script will be extracted and packaged using the version specified. The tool can be configured to be more lenient a can just take the latest versions of each file if that is the preferred behaviour.

DataStar Deployment File

The deployment file can be held under source control if required, however if you are using any agile tools such as Azure Dev Ops, Jira or Rally then the deployment file can be attached to user stories and be pulled in during the build.

dotnet-gitsources [options]
Switch Switch String Type Description
-ad --artifacts-directory String The output directory path for the packaged artifacts.
-bc --build-commit String This assumes that the deployment file is contained in a the GIT repository and can be located using the manifest regular expression. The deployment file will be obtained at the version specified.
-bf --build-file String Build the manifest from the specified deployment file. This assumes that the deployment file is loaded from a file and can be located using the manifest regular expression. Use this mode when the file is obtained as a separate step from your agile tooling.
-bt --build-tag String This assumes that the deployment file is contained in a the GIT repository and can be located using the manifest regular expression. The deployment file will be obtained at the tag specified.
-gd --git-directory String The path to the root of the git repository.
-ll --log-level String If you wish to change the verbosity of the logging then you can specify a log level with this flag. For example 'debug' will enable debug logging.
-mr --manifest.regexp String The regular expression for matching the manifests, if not specified any file with a ".xml" suffix will be matched.
-od --output-directory String The output directory path for any outputs.
-pa --package-author String If generating an output NuGet file, optionally specify the author.
-pf --package-file String The package filename to use for the output NuGet package.
-ps --package-summary String If generating an output NuGet file, optionally specify the description.
-pk --package-id String The package name to use for the output NuGet package.
-pv --package-version String The package version to use for the output NuGet package.
-vi --version.ignore Flag Ignore the manifest specific versions and use latest versions found in the repository.
-vl --version.lenient Flag Use the specified commit, but if not found fall back to the latest version available.

Flag = No value expected after the switch

String = Argument after the switch is expected to be a string

Integer = Argument after the switch is expected to be an integer

Boolean = Argument after the switch is expected to be a Boolean ("true" or "false")