From f6e74965932f4a8553b55f1e447ad86577804bed Mon Sep 17 00:00:00 2001 From: William Kempf Date: Sun, 1 Oct 2023 11:52:18 -0400 Subject: [PATCH] feat(vnext): add build script Modify build.ps1 to use InvokeBuild and add github actions workflow. --- .build_helper.ps1 | 34 ++ .../build_docs.ps1 | 0 {build_scripts => .build_scripts}/install.ps1 | 0 .../push_pages.ps1 | 0 {build_scripts => .build_scripts}/test.ps1 | 0 .buildartefacts/Testify.Assertions.deps.json | 82 ++++ .buildartefacts/Testify.Assertions.dll | Bin 0 -> 22016 bytes .buildartefacts/Testify.Assertions.xml | 378 ++++++++++++++++++ .github/workflows/github-actions.yml | 18 + .gitignore | 3 +- build.ps1 | 213 ++-------- 11 files changed, 551 insertions(+), 177 deletions(-) create mode 100644 .build_helper.ps1 rename {build_scripts => .build_scripts}/build_docs.ps1 (100%) rename {build_scripts => .build_scripts}/install.ps1 (100%) rename {build_scripts => .build_scripts}/push_pages.ps1 (100%) rename {build_scripts => .build_scripts}/test.ps1 (100%) create mode 100644 .buildartefacts/Testify.Assertions.deps.json create mode 100644 .buildartefacts/Testify.Assertions.dll create mode 100644 .buildartefacts/Testify.Assertions.xml create mode 100644 .github/workflows/github-actions.yml diff --git a/.build_helper.ps1 b/.build_helper.ps1 new file mode 100644 index 0000000..06d81bc --- /dev/null +++ b/.build_helper.ps1 @@ -0,0 +1,34 @@ +function Verbose($Message) { + if ($env:GITHUB_ACTIONS) { + Write-Output "::debug::$Message" + } + else { + Write-Verbose $Message + } +} + +function Section([System.ConsoleColor]$ForegroundColor, $Message) { + Write-Build $ForegroundColor "$Message $('-' * (80 - $Message.Length))" +} + +function Info($Message) { + Write-Build Cyan $Message +} + +function Warning($Message) { + if ($env:GITHUB_ACTIONS) { + Write-Output "::warning::$Message" + } + else { + Write-Build Yellow $Message + } +} + +function Error($Message) { + if ($env:GITHUB_ACTIONS) { + Write-Output "::error::$Message" + } + else { + Write-Build Red $Message + } +} \ No newline at end of file diff --git a/build_scripts/build_docs.ps1 b/.build_scripts/build_docs.ps1 similarity index 100% rename from build_scripts/build_docs.ps1 rename to .build_scripts/build_docs.ps1 diff --git a/build_scripts/install.ps1 b/.build_scripts/install.ps1 similarity index 100% rename from build_scripts/install.ps1 rename to .build_scripts/install.ps1 diff --git a/build_scripts/push_pages.ps1 b/.build_scripts/push_pages.ps1 similarity index 100% rename from build_scripts/push_pages.ps1 rename to .build_scripts/push_pages.ps1 diff --git a/build_scripts/test.ps1 b/.build_scripts/test.ps1 similarity index 100% rename from build_scripts/test.ps1 rename to .build_scripts/test.ps1 diff --git a/.buildartefacts/Testify.Assertions.deps.json b/.buildartefacts/Testify.Assertions.deps.json new file mode 100644 index 0000000..fdea207 --- /dev/null +++ b/.buildartefacts/Testify.Assertions.deps.json @@ -0,0 +1,82 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v7.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v7.0": { + "Testify.Assertions/1.0.0": { + "dependencies": { + "Microsoft.VisualStudio.Validation": "17.6.11" + }, + "runtime": { + "Testify.Assertions.dll": {} + } + }, + "Microsoft.VisualStudio.Validation/17.6.11": { + "runtime": { + "lib/net6.0/Microsoft.VisualStudio.Validation.dll": { + "assemblyVersion": "17.6.0.0", + "fileVersion": "17.6.11.23530" + } + }, + "resources": { + "lib/net6.0/cs/Microsoft.VisualStudio.Validation.resources.dll": { + "locale": "cs" + }, + "lib/net6.0/de/Microsoft.VisualStudio.Validation.resources.dll": { + "locale": "de" + }, + "lib/net6.0/es/Microsoft.VisualStudio.Validation.resources.dll": { + "locale": "es" + }, + "lib/net6.0/fr/Microsoft.VisualStudio.Validation.resources.dll": { + "locale": "fr" + }, + "lib/net6.0/it/Microsoft.VisualStudio.Validation.resources.dll": { + "locale": "it" + }, + "lib/net6.0/ja/Microsoft.VisualStudio.Validation.resources.dll": { + "locale": "ja" + }, + "lib/net6.0/ko/Microsoft.VisualStudio.Validation.resources.dll": { + "locale": "ko" + }, + "lib/net6.0/pl/Microsoft.VisualStudio.Validation.resources.dll": { + "locale": "pl" + }, + "lib/net6.0/pt-BR/Microsoft.VisualStudio.Validation.resources.dll": { + "locale": "pt-BR" + }, + "lib/net6.0/ru/Microsoft.VisualStudio.Validation.resources.dll": { + "locale": "ru" + }, + "lib/net6.0/tr/Microsoft.VisualStudio.Validation.resources.dll": { + "locale": "tr" + }, + "lib/net6.0/zh-Hans/Microsoft.VisualStudio.Validation.resources.dll": { + "locale": "zh-Hans" + }, + "lib/net6.0/zh-Hant/Microsoft.VisualStudio.Validation.resources.dll": { + "locale": "zh-Hant" + } + } + } + } + }, + "libraries": { + "Testify.Assertions/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "Microsoft.VisualStudio.Validation/17.6.11": { + "type": "package", + "serviceable": true, + "sha512": "sha512-J+9L/iac6c8cwcgVSCMuoIYOlD1Jw4mbZ8XMe1IZVj8p8+3dJ46LnnkIkTRMjK7xs9UtU9MoUp1JGhWoN6fAEw==", + "path": "microsoft.visualstudio.validation/17.6.11", + "hashPath": "microsoft.visualstudio.validation.17.6.11.nupkg.sha512" + } + } +} \ No newline at end of file diff --git a/.buildartefacts/Testify.Assertions.dll b/.buildartefacts/Testify.Assertions.dll new file mode 100644 index 0000000000000000000000000000000000000000..bd5f739f9679dfc348dd6e84daf7c89a24de9121 GIT binary patch literal 22016 zcmeHvd0-pmweOi3X(Y?GEXz(DvMP&%Vmro8LPEdL|pwL2FS|}-9p@ah6c~B?~y}WXJ>3#39G`+ubX0$j7y|nM$ zzur~QneQy$`ObIF`Of#vj7;~XH&cnDJ7USuuw@Qfk)cq3B#|&vq3uSdAQ zgow7)TS==QnAnyaT9`UD;>d?b)8~xGtqKT$9=wt`SXWuQ^`%o z;P$7_CsKs^_k-zbcmk2HW~+TwtFB)RWz`e4+xJ1GtLA)%uAPd)-a;-y;i|##6%8si zJ7%ciiBPRtP&B-+iks8-O~Pf=4dL)vOpxZj$=pmDNS=LDxLLJtDlRq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rofnJm@yIUw{@ApNG3omA z>K86v*oePIgGxBvSrrN#ik}8zC$N8G0x!tgWf7XI&;cAkRfMFpB_20-cjNhWY#8rY zd)1=O1RiSRl}41sx+>q77)S3v(&iY(qFEd5rhAvXVq$Z3JQ?A45iH@hp9XOf6+_VZ zEZy?(Pe|!r!)h+a_XOr~qC3mA=UM^uY<$<@A;7v-c^-k$Gs9T(ZgcX3j?b*jM}?Lgd4Xnb$z!rwxb# ztr6V1bl|p-?}>SUe&&369Kx{^$?UQuqpq{;dD*6icACM zZU0+@J8SrWmgARU_zM(_#&`YvBx59hw+;SAu_+G7cf$Ovu^#XeSjqAz)%dK!CZgo5 zZv&5?F!1w_{1Yyg%ir)0V3af6gyL2Wp9bted3_t8&w|GMoEy=%A@}9+t02!_ONlIA zkHSy6=K}9*+F?vYz5-6@w5 + + + Testify.Assertions + + + + + Represents a record that holds actual value for an assertion and the + expression for it. + + The type of the actual value. + + + + Represents a record that holds actual value for an assertion and the + expression for it. + + The type of the actual value. + + + + + + + + + + Provides methods used to start an assertion or for use within an assertion + implementation. + + + + + Pattern explanation:
+ + ○ Match the string "{because}".
+
+
+
+ + + Begins a fluent assertion by providing the actual value being asserted + on. + + The type of the actual value. + The actual value. + The expression used when providing the actual + value. + An instance representing the + actual value being asserted on. + + + + Begins a fluent assertion by providing an as the + value being asserted on. + + The for the actual value. + + The expression used when providing the action. + + An instance representing the + actual value being asserted on. + + + + Makes a "compound assertion" that fails with the specified message if any + wrapped assertions fail. + + The assertion failure message to report if any + wrapped assertions fail. + The to invoke which makes + assertions to be wrapped in the "compound assertions". + + This is a very low level assertion generally used in the implementation + of other "compound assertions" and not made directly within tests. The + behavior of assertions are temporarily changed within the scope of the + invoked to combine assertion failures, + rather than to immediately throw them. This allows multiple assertions + to be combined into a single assertion with a meaningful failure + message. Note that only assertion methods within Testify will be + combined this way, and any other exceptions thrown within the + will cause an immediate test failure. + + + + + Asserts that the value should satisfy all of + the assertions made when invoking . + + The type of the actual value being asserted on. + + The actual value being asserted on. + An that makes multiple + assertions on the value. + + + + Generates a test platform specific failure exception. If the test + platform cannot be determined then raises the non-platform specific + . + + The assertion message, including the "{because}" + hole used to format the user specified reason for the failure. + + The user specified reason for the failure. + + + + + Represents assertion failures that occur during test execution. + + + This is the exception type thrown by assertions in the Testify + framework when no unit test framework can be detected. + + + + + Initializes a new instance of the + class. + + + + + Initializes a new instance of the class + with a specified failure message. + + The message that describes the reason for an + assertion failure. + + + + Initializes a new instance of the class + with a specified failure message and a reference to the inner exception + that is the cause of this exception. + + The message that describes the reason for an + assertion failure. + The exception that is the cause of the current + exception, or a reference if no inner + exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The + that + holds the serialized object data about the exception being thrown. + + The + that + contains contextual information about the source or destination. + + is + . + The class name is + or is zero + (0). + + + + Provides fluent assertions for values. + + + + + Asserts that the value should be + . + + The instance that + represents the actual value being asserted on. + The user supplied "because phrase" describing why + the assertion is being made. + + + + Asserts that the value should be + . + + The instance that + represents the actual value being asserted on. + The user supplied "because phrase" describing why + the assertion is being made. + + + + Provides fluent assertions for exceptions. + + + + + Asserts that the action, when invoked, should throw an . + + The instance that + represents the actual value being asserted on. + The user supplied "because phrase" describing why + the assertion is being made. + An instance which + can be used to make additional assertions about the exception + thrown. + + + + Asserts that the action, when called, should throw the specified + exception type. + + The exception type expected to be thrown. + + The instance that + represents the actual value being asserted on. + The user supplied "because phrase" describing why + the assertion is being made. + An instance which + can be used to make additional assertions about the exception + thrown. + + + + Asserts that the action, when invoked, should not throw any exceptions. + + The instance that + represents the actual value being asserted on. + The user supplied "because phrase" describing why + the assertion is being made. + + This assertion isn't strictly needed as code that throws will fail a + test. However, using + does a better + job describing the intent of the test code, as well as provides a better + test failure message. + + + + + Asserts the , when invoked, should not throw the + specified exception type. + + The exception type not expected to be thrown. + + The instance that + represents the actual value being asserted on. + The user supplied "because phrase" describing why + the assertion is being made. + + This assertion isn't strictly needed as code that throws will fail a + test. However, using + does a better + job describing the intent of the test code, as well as provides a better + test failure message. + + + + + Result from throw assertions that provides fluent method for making + additional assertions about the exception thrown. + + The exception type. + + + + Called to provide additional assertions about the exception that was + thrown. + + The action called to make additional assertions + about the exception that was thrown. + + + + Provides methods to help with formatting of assertion failure messages. + + + + + Formats the specified value in a manner appropriate for assertion + failure messages. + + The value to format. + The caller expression provided for the value. + + A formatted representation of the and + . + + Several types and values are formatted to provide better assertion + messages. You can extend special formatting to other types (TODO). + + + + + Formats the specified caller expression. + + The caller expression. + The formatted caller expression. + + + + Provides a mechanism for controlling the formatting of values in assertion + failure messages. + + + + + Determines whether this instance can format the specified + . + + The value to be formatted. + true if this instance can format the specified value; + otherwise, false. + + + + Formats the specified . + + The value to be formatted. + The formatted string representation for the + . + + + + Base class for types that can format the specified type. + + The type to format. + + + + + + + + Formats the specified . + + The value to be formatted. + The formatted string representation for the + . + + + + + + Custom -derived type for the BecauseHole method. + + + Cached, thread-safe singleton instance. + + + Initializes the instance. + + + Provides a factory for creating instances to be used by methods on . + + + Creates an instance of a used by methods on . + + + Provides the runner that contains the custom logic implementing the specified regular expression. + + + Scan the starting from base.runtextstart for the next match. + The text being scanned by the regular expression. + + + Search starting from base.runtextpos for the next location a match could possibly start. + The text being scanned by the regular expression. + true if a possible match was found; false if no more matches are possible. + + + Helper methods used by generated -derived implementations. + + + Default timeout value set in , or if none was set. + + + Whether is non-infinite. + +
+
diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml new file mode 100644 index 0000000..15a61d6 --- /dev/null +++ b/.github/workflows/github-actions.yml @@ -0,0 +1,18 @@ +name: GitHub Actions Demo +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." diff --git a/.gitignore b/.gitignore index 81483b3..9e9a015 100644 --- a/.gitignore +++ b/.gitignore @@ -239,4 +239,5 @@ _Pvt_Extensions docs/site.zip tools/ -environment.ps1 \ No newline at end of file +environment.ps1 +.buildtools/ \ No newline at end of file diff --git a/build.ps1 b/build.ps1 index 0c73535..85ab372 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,195 +1,56 @@ -########################################################################## -# This is the Cake bootstrapper script for PowerShell. -# This file was downloaded from https://github.com/cake-build/resources -# Feel free to change this file to fit your needs. -########################################################################## - -<# - -.SYNOPSIS -This is a Powershell script to bootstrap a Cake build. - -.DESCRIPTION -This Powershell script will download NuGet if missing, restore NuGet tools (including Cake) -and execute your Cake build script with the parameters you provide. - -.PARAMETER Script -The build script to execute. -.PARAMETER Target -The build script target to run. -.PARAMETER Configuration -The build configuration to use. -.PARAMETER Verbosity -Specifies the amount of information to be displayed. -.PARAMETER Experimental -Tells Cake to use the latest Roslyn release. -.PARAMETER WhatIf -Performs a dry run of the build script. -No tasks will be executed. -.PARAMETER Mono -Tells Cake to use the Mono scripting engine. -.PARAMETER SkipToolPackageRestore -Skips restoring of packages. -.PARAMETER ScriptArgs -Remaining arguments are added here. - -.LINK -http://cakebuild.net - -#> - -[CmdletBinding()] -Param( - [string]$Script = "testify.cake", - [ValidateSet("Clean", "Restore", "Version", "Build", "Test", "Push", "Docs", "ReleaseNotes", "Default")] - [string]$Target = "Default", - [ValidateSet("Release", "Debug")] - [string]$Configuration = "Release", - [ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")] - [string]$Verbosity = "Verbose", - [switch]$Experimental, - [Alias("DryRun","Noop")] - [switch]$WhatIf, - [switch]$Mono, - [switch]$SkipToolPackageRestore, - [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)] - [string[]]$ScriptArgs +param( + [Parameter(Position = 0)] + [string[]]$Tasks ) -[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null -function MD5HashFile([string] $filePath) -{ - if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf)) - { - return $null - } - - [System.IO.Stream] $file = $null; - [System.Security.Cryptography.MD5] $md5 = $null; - try - { - $md5 = [System.Security.Cryptography.MD5]::Create() - $file = [System.IO.File]::OpenRead($filePath) - return [System.BitConverter]::ToString($md5.ComputeHash($file)) - } - finally - { - if ($file -ne $null) - { - $file.Dispose() - } - } -} - -Write-Host "Configuring environment..." -if (Test-Path(".\environment.ps1")) { - . .\environment.ps1 -} - -Write-Host "Preparing to run build script..." +. .build_helper.ps1 -if(!$PSScriptRoot){ - $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent +$script:BuildToolsPath = Join-Path $PSScriptRoot .buildtools +Write-Verbose "Build tools path: $BuildToolsPath" +if (-not ($env:PSModulePath -split [System.Io.Path]::PathSeparator | Where-Object { $_ -eq $script:BuildToolsPath })) { + Write-Verbose 'Adding build tools path to PSModulePath.' + $env:PSModulePath = $script:BuildToolsPath + [System.Io.Path]::PathSeparator + $env:PSModulePath + Write-Verbose "PSModulePath: $env:PSModulePath" } -$TOOLS_DIR = Join-Path $PSScriptRoot "tools" -$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe" -$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe" -$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config" -$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum" - -# Should we use mono? -$UseMono = ""; -if($Mono.IsPresent) { - Write-Verbose -Message "Using the Mono based scripting engine." - $UseMono = "-mono" -} - -# Should we use the new Roslyn? -$UseExperimental = ""; -if($Experimental.IsPresent -and !($Mono.IsPresent)) { - Write-Verbose -Message "Using experimental version of Roslyn." - $UseExperimental = "-experimental" -} - -# Is this a dry run? -$UseDryRun = ""; -if($WhatIf.IsPresent) { - $UseDryRun = "-dryrun" +if (-not (Get-Command Invoke-Build -ErrorAction SilentlyContinue)) { + Write-Verbose 'Searching for InvokeBuild module.' + if (-not (Get-Module InvokeBuild -ListAvailable)) { + Write-Verbose 'InvokeBuild module not found. Installing from PSGallery.' + Save-Module -Name InvokeBuild -Path $script:BuildToolsPath -Force + } + Write-Verbose 'Importing InvokeBuild module.' + Import-Module InvokeBuild } -# Make sure tools folder exists -if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) { - Write-Verbose -Message "Creating tools directory..." - New-Item -Path $TOOLS_DIR -Type directory | out-null +# call the build engine with this script and return +if ($MyInvocation.ScriptName -notlike '*Invoke-Build.ps1') { + Write-Verbose 'Calling Invoke-Build.' + Invoke-Build $Tasks $MyInvocation.MyCommand.Path @PSBoundParameters + return } -# Make sure that packages.config exist. -if (!(Test-Path $PACKAGES_CONFIG)) { - Write-Verbose -Message "Downloading packages.config..." - try { (New-Object System.Net.WebClient).DownloadFile("http://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) } catch { - Throw "Could not download packages.config." - } +Set-BuildHeader { + param($Path) + Section DarkYellow "Task $Path" } -# Try find NuGet.exe in path if not exists -if (!(Test-Path $NUGET_EXE)) { - Write-Verbose -Message "Trying to find nuget.exe in PATH..." - $existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_) } - $NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1 - if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) { - Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)." - $NUGET_EXE = $NUGET_EXE_IN_PATH.FullName - } +Set-BuildFooter { + param($Path) + Section DarkYellow "Done $Path, $($Task.Elapsed)" } -# Try download NuGet.exe if not exists -if (!(Test-Path $NUGET_EXE)) { - Write-Verbose -Message "Downloading NuGet.exe..." - try { - (New-Object System.Net.WebClient).DownloadFile($NUGET_URL, $NUGET_EXE) - } catch { - Throw "Could not download NuGet.exe." - } +task restore { + dotnet restore Testify.sln --no-cache --force --verbosity quiet } -# Save nuget.exe path to environment to be available to child processed -$ENV:NUGET_EXE = $NUGET_EXE - -# Restore tools from NuGet? -if(-Not $SkipToolPackageRestore.IsPresent) { - Push-Location - Set-Location $TOOLS_DIR - - # Check for changes in packages.config and remove installed tools if true. - [string] $md5Hash = MD5HashFile($PACKAGES_CONFIG) - if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or - ($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) { - Write-Verbose -Message "Missing or changed package.config hash..." - Remove-Item * -Recurse -Exclude packages.config,nuget.exe - } - - Write-Verbose -Message "Restoring tools from NuGet..." - $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`"" - - if ($LASTEXITCODE -ne 0) { - Throw "An error occured while restoring NuGet tools." - } - else - { - $md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII" - } - Write-Verbose -Message ($NuGetOutput | out-string) - Pop-Location +task build restore, { + dotnet build Testify.sln -c Release --no-restore --nologo } -# Make sure that Cake has been installed. -if (!(Test-Path $CAKE_EXE)) { - Throw "Could not find Cake.exe at $CAKE_EXE" +task test build, { + dotnet test Testify.sln -c Release --no-build --no-restore --nologo } -# Start Cake -Write-Host "Running build script..." -Invoke-Expression "& `"$CAKE_EXE`" `"$Script`" -target=`"$Target`" -configuration=`"$Configuration`" -verbosity=`"$Verbosity`" $UseMono $UseDryRun $UseExperimental $ScriptArgs" -exit $LASTEXITCODE \ No newline at end of file +# Synopsis: Default build task. +task . build \ No newline at end of file