### Quick Start Examples Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Provides quick start examples for common Incrementalist use cases, such as getting affected projects, listing affected folders, and building only affected projects. ```shell # Get list of affected projects and save to file incrementalist run --dry -b dev -f ./affected-projects.txt # Specify solution explicitly incrementalist run --dry -s ./src/MySolution.sln -b dev -f ./affected-projects.txt # Get list of affected folders incrementalist list-affected-folders -b dev -f ./affected-folders.txt # Build only affected projects incrementalist run -b dev -- build -c Release --nologo ``` -------------------------------- ### Run Incrementalist Commands (Global Tool) Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Examples of running Incrementalist commands when installed as a global tool. Demonstrates common operations like finding affected projects, listing affected folders, and running tests. ```shell # Get list of affected projects incrementalist run --dry -b dev -f ./affected-projects.txt # List affected folders incrementalist list-affected-folders -b dev -f ./affected-folders.txt # Run tests for affected projects incrementalist run -b dev -- test -c Release # Run tests for affected projects matching a glob incrementalist run -b dev --target-glob "src/*.Tests.csproj" -- test -c Release ``` -------------------------------- ### Run Incrementalist Commands (Local Tool) Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Examples of running Incrementalist commands when installed as a local tool. Requires using `dotnet incrementalist` instead of `incrementalist` directly. ```shell # Get list of affected projects dotnet incrementalist -- -b dev -f ./affected-projects.txt # List affected folders dotnet incrementalist -- list-affected-folders -b dev -f ./affected-folders.txt # Build affected projects dotnet incrementalist -- run -b dev -- build -c Release --nologo # Run tests with coverage dotnet incrementalist -- run -b dev -- test -c Release --no-build --logger:trx --collect:"XPlat Code Coverage" --results-directory ./testresults # Run in parallel mode dotnet incrementalist -- run -b dev --parallel -- build -c Release --nologo # Save affected projects AND run commands dotnet incrementalist -- -b dev -f ./affected-projects.txt run -- build -c Release --nologo ``` -------------------------------- ### Run dotnet test with run-process (CLI) Source: https://github.com/petabridge/incrementalist/blob/dev/docs/examples.md Demonstrates using the `run-process` verb with Incrementalist to execute `dotnet test` commands. This is an alternative syntax for the `run` verb, designed for better discoverability of non-dotnet commands in the future. ```shell incrementalist run-process --process dotnet -b dev -- test -c Release ``` -------------------------------- ### Incrementalist Configuration Schema Example Source: https://github.com/petabridge/incrementalist/blob/dev/docs/config.md Example of an Incrementalist configuration file with the $schema property enabled for IDE IntelliSense, auto-completion, and validation. ```json { "$schema": "https://raw.githubusercontent.com/petabridge/Incrementalist/dev/src/Incrementalist.Cmd/Config/incrementalist.schema.json", "gitBranch": "master", "solutionFilePath": "MySolution.sln" } ``` -------------------------------- ### Sample Incrementalist Configuration File Source: https://github.com/petabridge/incrementalist/blob/dev/docs/config.md A comprehensive example of an Incrementalist configuration file showcasing all available settings and their typical values. ```json { "$schema": "https://raw.githubusercontent.com/petabridge/Incrementalist/dev/src/Incrementalist.Cmd/Config/incrementalist.schema.json", "gitBranch": "master", "solutionFilePath": "MySolution.sln", "outputFile": "affected-projects.txt", "workingDirectory": null, "verbose": false, "timeoutMinutes": 2, "continueOnError": true, "runInParallel": false, "failOnNoProjects": false, "noCache": false, "skip": ["**/bin/**", "**/obj/**"], "target": ["src/**/*.csproj"], "nameApplicationToStart": "dotnet" } ``` -------------------------------- ### Run All Tests (Akka.Management) Source: https://github.com/petabridge/incrementalist/blob/dev/docs/examples.md A default Incrementalist configuration used on Linux agents for Akka.Management, ensuring the full test suite is executed without platform compatibility issues. ```json { "include": [ { "project": "**/*" } ] } ``` -------------------------------- ### Install Incrementalist CLI Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Installs the Incrementalist command-line tool globally or locally within a project. This allows for easy execution of Incrementalist commands from the terminal. ```shell dotnet tool install --global Incrementalist.Cmd ``` ```shell # From your repository root dotnet new tool-manifest # if you haven't already created a .config/dotnet-tools.json dotnet tool install Incrementalist.Cmd ``` -------------------------------- ### Incrementalist Project List Output Source: https://github.com/petabridge/incrementalist/blob/dev/docs/how-it-works.md Example format for the project list output generated by Incrementalist when using the `run` verb. ```plaintext D:\src\Project1\Project1.csproj,D:\src\Project2\Project2.csproj ``` -------------------------------- ### Incrementalist Folder List Output Source: https://github.com/petabridge/incrementalist/blob/dev/docs/how-it-works.md Example format for the folder list output generated by Incrementalist when using the `list-affected-folders` verb. ```plaintext D:\src\Project1,D:\src\Project2\SubFolder ``` -------------------------------- ### Skip TestContainer Projects on Windows (Akka.Management) Source: https://github.com/petabridge/incrementalist/blob/dev/docs/examples.md This configuration skips test projects that rely on TestContainer support, specifically when running on Windows build agents that cannot execute Docker images. It ensures build stability by avoiding incompatible tests. ```json { "exclude": [ { "project": "**/tests/Akka.Management.Tests.Testcontainers/*" } ] } ``` -------------------------------- ### Run Only .NET Framework Tests (Akka.NET) Source: https://github.com/petabridge/incrementalist/blob/dev/docs/examples.md This configuration for Incrementalist is used to selectively run only .NET Framework tests within the Akka.NET project. It demonstrates filtering tests based on framework compatibility. ```json { "include": [ { "project": "**/tests/Akka.Tests.TestKit.Xunit2/*", "testFramework": "xunit" } ], "exclude": [ { "project": "**/tests/Akka.Tests.TestKit.Xunit3/*" } ] } ``` -------------------------------- ### Run Only Multi-Node Tests (Akka.NET) Source: https://github.com/petabridge/incrementalist/blob/dev/docs/examples.md This Incrementalist configuration is designed to execute only multi-node tests in the Akka.NET project. It's useful for scenarios where specific distributed system tests need to be run. ```json { "include": [ { "project": "**/tests/Akka.MultiNode.Tests/*" } ] } ``` -------------------------------- ### Basic .NET Build Commands Source: https://github.com/petabridge/incrementalist/blob/dev/docs/building.md Commands for building the .NET solution with different configurations (Debug/Release) and running unit tests. Includes options for detailed logging. ```bash dotnet build dotnet build -c Release dotnet test dotnet test -c Release dotnet test --logger:trx --logger:"console;verbosity=normal" ``` -------------------------------- ### Run Custom Process with Incrementalist Source: https://github.com/petabridge/incrementalist/blob/dev/RELEASE_NOTES.md Demonstrates how to use the `run-process` verb to execute arbitrary shell commands. This allows for custom pre- or post-build/test actions. ```shell incrementalist run-process --process /bin/bash -- echo 'Hello from Incrementalist!' ``` -------------------------------- ### Creating NuGet Packages Source: https://github.com/petabridge/incrementalist/blob/dev/docs/building.md Commands to create NuGet packages from the .NET solution, with options to include symbols and specify an output directory. ```bash dotnet pack -c Release -o bin/nuget dotnet pack -c Release -o bin/nuget --include-symbols ``` -------------------------------- ### Publishing Incrementalist Packages to NuGet Source: https://github.com/petabridge/incrementalist/blob/dev/docs/building.md Commands to build release packages and push them to a NuGet repository. Requires replacing a placeholder API key. ```bash dotnet build -c Release dotnet pack -c Release -o bin/nuget --include-symbols --no-build dotnet nuget push bin/nuget/*.nupkg --api-key YOUR_API_KEY --source https://api.nuget.org/v3/index.json ``` -------------------------------- ### Incrementalist Verification Steps Source: https://github.com/petabridge/incrementalist/blob/dev/docs/building.md Steps for verifying Incrementalist functionality, including basic build/test, full release build/test, and integration tests. Also covers package verification. ```bash # Basic Verification dotnet build dotnet test # Full Verification dotnet build -c Release dotnet test -c Release --no-build ./scripts/integration-tests.ps1 -Configuration Release # Package Verification dotnet pack -c Release -o bin/nuget --include-symbols # Check bin/nuget/*.nupkg contents using NuGet Package Explorer or similar tool ``` -------------------------------- ### Manage Incrementalist Configuration Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Commands for managing Incrementalist configuration files, including creating a default configuration file with current settings. ```shell # Use default configuration file (.incrementalist/incrementalist.json) incrementalist run -- build # Specify a custom configuration file incrementalist -c my-config.json run -- build # Create configuration file with current settings incrementalist create-config -b dev --verbose --parallel ``` -------------------------------- ### Incrementalist CLI Commands Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Demonstrates common Incrementalist CLI commands for building, testing, and controlling execution flow. ```shell incrementalist run -b dev -- build -c Release --nologo incrementalist run -b dev -- test -c Release --no-build --nologo incrementalist run -b dev --parallel -- build -c Release --nologo incrementalist run -b dev --continue-on-error=false -- build -c Release --nologo incrementalist run -b dev --dry -- build -c Release --nologo ``` -------------------------------- ### Run with Custom Configuration Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Executes a build command using a specified custom configuration file ('./my-incrementalist-config.json'). ```shell incrementalist run -c ./my-incrementalist-config.json -- build -c Release ``` -------------------------------- ### Typical Incrementalist Workflow Source: https://github.com/petabridge/incrementalist/blob/dev/docs/config.md Illustrates a common workflow for using incrementalist. It covers creating a default configuration file, running tasks using that configuration, and overriding specific settings for individual runs. This showcases the flexibility of incrementalist for managing build and test processes. ```bash incrementalist create-config -b main --verbose --parallel incrementalist run -- build -c Release incrementalist -b feature-branch run -- test ``` -------------------------------- ### Incrementalist Configuration File Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Demonstrates how to create and use a JSON configuration file for Incrementalist to store common settings, reducing the need for repetitive command-line arguments. ```json { "gitBranch": "dev", "verbose": true, "runInParallel": true } ``` -------------------------------- ### Incrementalist Command Execution Flow Source: https://github.com/petabridge/incrementalist/blob/dev/docs/how-it-works.md Outlines the different command verbs Incrementalist supports and their corresponding execution paths, from listing affected projects to creating configuration files. ```mermaid flowchart TD A[Incrementalist Command] --> B{Command Verb} B -->|Default| C[List Affected Projects] B -->|list-affected-folders| D[List Affected Folders] B -->|run| E[Execute dotnet Commands] B -->|create-config| F[Create Config File] C --> G[Save to File] D --> G E --> H[Build/Test Projects] F --> I[Save Configuration] style A fill:#f96,stroke:#333,stroke-width:4px ``` -------------------------------- ### Creating Incrementalist Configuration File with Options Source: https://github.com/petabridge/incrementalist/blob/dev/docs/config.md Demonstrates the `create-config` verb to generate a configuration file based on current command-line options. ```bash incrementalist create-config -b master --verbose --parallel ``` -------------------------------- ### Incrementalist Common Options Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Lists common command-line options available across all Incrementalist verbs, including solution file, output file, branch, working directory, verbosity, timeout, configuration, error handling, parallelism, and glob patterns for filtering. ```APIDOC Common Options: -s, --sln Optional. Solution file to analyze. Uses first .sln in current directory if not specified. -f, --file Optional. Write output to the specified file. -b, --branch Optional. Git branch to compare against (e.g., 'dev' or 'master'). -d, --dir Optional. Working directory. Defaults to current directory. --verbose Optional. (Default: false) Enable debug logging. -t, --timeout Optional. (Default: 2) Solution load timeout in minutes. -c, --config Optional. Path to the configuration file. Defaults to .incrementalist/incrementalist.json in the current directory. --continue-on-error Optional. (Default: true) Continue executing commands even if some fail. --parallel Optional. (Default: false) Execute commands in parallel. --fail-on-no-projects Optional. (Default: false) Fail if no projects are affected. --skip-glob Optional. Glob pattern to exclude projects from the final list. Applied after analyzing dependencies. Can be used multiple times. --target-glob Optional. Glob pattern to include only matching projects in the final list. Applied after analyzing dependencies. Can be used multiple times. --help Display help screen. --version Display version information. ``` -------------------------------- ### Incrementalist Verbs Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Details the available verbs for the Incrementalist CLI: 'create-config' for generating configuration files, 'list-affected-folders' for listing affected directories, and 'run' for executing commands against affected projects. ```APIDOC Available Verbs: create-config Creates a new configuration file with current options. incrementalist create-config [options] list-affected-folders List affected folders instead of .NET projects. incrementalist list-affected-folders [options] run Run a command against affected projects. Use the `--dry` option to test without executing. incrementalist run [options] -- [dotnet command and arguments] Additional options for run: --dry Optional. (Default: false) Performs a dry run without executing any commands. Useful for testing. run-process Run a custom process against affected projects. Currently a discoverable alias for `run` that only supports dotnet commands. incrementalist run-process [options] -- [process arguments] Additional options for run-process: --process Required. The name or path of the process to start (e.g. 'dotnet', '/bin/bash', 'mytool'). Currently only 'dotnet' is supported. --dry Optional. (Default: false) Performs a dry run without executing any commands. Useful for testing. ``` -------------------------------- ### Basic Incrementalist Usage with Configuration File Source: https://github.com/petabridge/incrementalist/blob/dev/docs/config.md Demonstrates how to use a default Incrementalist configuration file (`.incrementalist/incrementalist.json`) for basic operations. ```bash incrementalist run -- build ``` -------------------------------- ### Incrementalist Basic Workflow Source: https://github.com/petabridge/incrementalist/blob/dev/docs/how-it-works.md Illustrates the fundamental process of Incrementalist, from Git changes to building affected projects. ```mermaid flowchart TD A[Your Git Changes] --> B[Incrementalist] B --> C{Analyze Changes} C -->|Solution-wide changes| D[Build All Projects] C -->|Specific changes| E[Build Affected Projects] style B fill:#f9f,stroke:#333,stroke-width:4px ``` -------------------------------- ### Save Affected Projects and Build Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Identifies affected projects, saves them to 'affected-projects.txt', and then executes a Release build. ```shell incrementalist run -b dev -f ./affected-projects.txt -- build -c Release --nologo ``` -------------------------------- ### Incrementalist Usage with Custom Configuration File Source: https://github.com/petabridge/incrementalist/blob/dev/docs/config.md Shows how to specify a custom configuration file using the `-c` or `--config` command-line option. ```bash incrementalist run -c my-custom-config.json -- build ``` -------------------------------- ### Running Incrementalist Integration Tests Source: https://github.com/petabridge/incrementalist/blob/dev/docs/building.md PowerShell script to execute the integration test suite for Incrementalist. Supports specifying the build configuration. ```powershell ./scripts/integration-tests.ps1 ./scripts/integration-tests.ps1 -Configuration Release ``` -------------------------------- ### Create Custom Configuration File Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Generates an Incrementalist configuration file with a custom name and path ('./my-incrementalist-config.json'), enabling verbose logging and parallel execution. ```shell incrementalist create-config -b dev --verbose --parallel -c ./my-incrementalist-config.json ``` -------------------------------- ### Run Tests with Code Coverage Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Executes tests for affected projects and collects code coverage data in Cobertura format, saving the output to './coverage/'. ```shell incrementalist run -b dev -- test -c Release --no-build --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=./coverage/ ``` -------------------------------- ### Create Default Configuration File Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Generates a default Incrementalist configuration file in the '.incrementalist/incrementalist.json' path with verbose logging and parallel execution enabled. ```shell incrementalist create-config -b dev --verbose --parallel ``` -------------------------------- ### Incrementalist Detailed Analysis Process Source: https://github.com/petabridge/incrementalist/blob/dev/docs/how-it-works.md Details the step-by-step analysis Incrementalist performs, including checking for solution-wide changes and analyzing project dependencies. ```mermaid flowchart LR A[Git Changes] --> B[Check Files] B --> C{Solution-wide?} C -->|Yes| D[Full Build] C -->|No| E[Project Analysis] E --> F[Find Dependencies] F --> G[Generate Build List] subgraph "Solution-wide Changes" H[Directory.Build.props] I[global.json] J[.sln files] end H --> C I --> C J --> C ``` -------------------------------- ### Create Configuration with Custom File Name Source: https://github.com/petabridge/incrementalist/blob/dev/docs/config.md Demonstrates how to create an incrementalist configuration file using a custom file name and location via the `-c` or `--config` option. This allows users to manage their configuration files more flexibly. ```bash incrementalist create-config -b master --verbose --parallel -c ./my-config.json ``` -------------------------------- ### Azure Pipelines Configuration Source: https://github.com/petabridge/incrementalist/blob/dev/build-system/README.md YAML files for Azure Pipelines to manage build processes. Supports pull request validation on Linux and Windows, and automated NuGet releases. ```yaml # Example Azure Pipelines YAML configuration # This is a placeholder for the actual content of the YAML files. # Specific variables like 'windows-release.yaml' need project-specific adjustments. trigger: branches: include: - main - release/* pool: vmImage: 'ubuntu-latest' # Or 'windows-latest' depending on the build steps: - script: echo "Building the project..." displayName: 'Run a multi-line script' ``` -------------------------------- ### Incrementalist Output File Formats Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Describes the two types of output files Incrementalist can generate: Project Lists (containing .csproj paths) and Folder Lists (containing directory paths). These files are useful for automation. ```APIDOC Output Files: Project Lists (with the `run` verb): D:\src\Project1\Project1.csproj,D:\src\Project2\Project2.csproj Folder Lists (with the `list-affected-folders` verb): D:\src\Project1,D:\src\Project2\SubFolder ``` -------------------------------- ### Perform Dry Run Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Simulates running a build command for affected projects on the 'dev' branch without actually executing the command. Useful for verifying the command and affected projects. ```shell incrementalist run -b dev --dry -- build -c Release --nologo ``` -------------------------------- ### Filtering Projects with Glob Patterns Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Shows how to use glob patterns to include or exclude specific projects during Incrementalist runs. ```shell incrementalist run -b dev --target-glob "src/**/*.csproj" --skip-glob "**/*.Tests.csproj" -- build -c Release --nologo ``` -------------------------------- ### Run Tests for Affected Projects Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Executes tests for projects affected by changes on the 'dev' branch. Includes options to skip building and suppress build output. ```shell incrementalist run -b dev -- test -c Release --no-build --nologo ``` -------------------------------- ### Incrementalist Usage Overriding Configuration Values Source: https://github.com/petabridge/incrementalist/blob/dev/docs/config.md Illustrates how command-line arguments can override settings defined in the configuration file. ```bash incrementalist run -b dev --verbose false -- build ``` -------------------------------- ### Filter Test Projects for Execution Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Runs commands only on projects matching the '**/*.Tests.csproj' glob pattern, saving the list to 'affected-test-projects.txt'. ```shell incrementalist run -b dev --target-glob "**/*.Tests.csproj" -f ./affected-test-projects.txt ``` -------------------------------- ### Exclude Test Projects from Execution Source: https://github.com/petabridge/incrementalist/blob/dev/README.md Excludes projects matching the '**/*.Tests.csproj' glob pattern from the execution list, saving the remaining projects to 'affected-non-test-projects.txt'. ```shell incrementalist run -b dev --skip-glob "**/*.Tests.csproj" -f ./affected-non-test-projects.txt ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.