From f83f961dcbcb409c7d8b1aaea6efa3b29b015a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Ulsberg?= Date: Tue, 23 Feb 2016 15:35:41 +0100 Subject: [PATCH 1/4] Convert LF to CRLF --- docs/usage/msbuild-task.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/usage/msbuild-task.md b/docs/usage/msbuild-task.md index 4c7a71b64f..566e77e0b9 100644 --- a/docs/usage/msbuild-task.md +++ b/docs/usage/msbuild-task.md @@ -2,7 +2,7 @@ The MSBuild Task for GitVersion — **GitVersionTask** — a simple solution if you want to version your assemblies without writing any command line scripts or -modifying your build process. +modifying your build process. ## TL;DR @@ -10,7 +10,7 @@ modifying your build process. It works simply by installing the [GitVersionTask NuGet Package](https://www.nuget.org/packages/GitVersionTask/) into the project you -want to have versioned by GitVersion: +want to have versioned by GitVersion: Install-Package GitVersionTask @@ -18,7 +18,7 @@ want to have versioned by GitVersion: The next thing you need to do, is remove the `Assembly*Version` attributes from your `Properties\AssemblyInfo.cs` files, so GitVersionTask can be in charge of -versioning your assemblies. +versioning your assemblies. ### Done! @@ -32,7 +32,7 @@ described below. ## How does it work? -### Inject version metadata into the assembly +### Inject version metadata into the assembly The sub-task named `GitVersionTask.UpdateAssemblyInfo` will inject version metadata into the assembly which GitVersionTask is added to. For each assembly @@ -56,24 +56,24 @@ Now when you build: * `AssemblyVersion` will be set to the `AssemblySemVer` variable. * `AssemblyFileVersion` will be set to the `MajorMinorPatch` variable with a * appended `.0`. `AssemblyInformationalVersion` will be set to the -* `InformationalVersion` variable. +* `InformationalVersion` variable. #### Other injected Variables All other [variables](../more-info/variables.md) will be injected into an -internal static class: +internal static class: ```c# namespace AssemblyName { - [CompilerGenerated] - internal static class GitVersionInformation - { - public static string Major = "1"; - public static string Minor = "1"; - public static string Patch = "0"; - ...All other variables - } + [CompilerGenerated] + internal static class GitVersionInformation + { + public static string Major = "1"; + public static string Minor = "1"; + public static string Patch = "0"; + ...All other variables + } } ``` @@ -118,7 +118,7 @@ After `GitVersionTask.GetVersion` has executed, the MSBuild properties can be used in the standard way. For example: ```xml - + ``` ### Communicate variables to current Build Server @@ -129,7 +129,7 @@ the version information to the current Build Server log. If, at build time, it is detected that the build is occurring inside a Build Server then the [variables](../more-info/variables.md) will be written to the Build Server log in a format that the current Build Server can consume. See -[Build Server Support](../build-server-support/build-server-support.md). +[Build Server Support](../build-server-support/build-server-support.md). ## Conditional control tasks @@ -147,7 +147,7 @@ this: ... ``` - + ## My Git repository requires authentication. What do I do? Set the environmental variables `GITVERSION_REMOTE_USERNAME` and From 34adbc9442d884b7a3b36271e7e7e7dbb0288185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Ulsberg?= Date: Tue, 23 Feb 2016 15:36:43 +0100 Subject: [PATCH 2/4] Replace "c#" syntax identifiers with "csharp" since ReadTheDocs doesn't seem to understand the former. --- docs/usage/msbuild-task.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/usage/msbuild-task.md b/docs/usage/msbuild-task.md index 566e77e0b9..6740577c5c 100644 --- a/docs/usage/msbuild-task.md +++ b/docs/usage/msbuild-task.md @@ -45,7 +45,7 @@ At build time a temporary `AssemblyInfo.cs` will be created that contains the appropriate SemVer information. This will be included in the build pipeline. Sample default: -```c# +```csharp [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.1.0+Branch.master.Sha.722aad3217bd49a6576b6f82f60884e612f9ba58")] @@ -63,7 +63,7 @@ Now when you build: All other [variables](../more-info/variables.md) will be injected into an internal static class: -```c# +```csharp namespace AssemblyName { [CompilerGenerated] @@ -81,7 +81,7 @@ namespace AssemblyName ##### All variables -```c# +```csharp var assemblyName = assembly.GetName().Name; var gitVersionInformationType = assembly.GetType(assemblyName + ".GitVersionInformation"); var fields = gitVersionInformationType.GetFields(); @@ -94,7 +94,7 @@ foreach (var field in fields) ##### Specific variable -```c# +```csharp var assemblyName = assembly.GetName().Name; var gitVersionInformationType = assembly.GetType(assemblyName + ".GitVersionInformation"); var versionField = gitVersionInformationType.GetField("Major"); From 0e49bd777760c83d8fc5da823afa5d063e28154e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Ulsberg?= Date: Tue, 23 Feb 2016 15:37:05 +0100 Subject: [PATCH 3/4] Added missing "is" --- docs/usage/msbuild-task.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/usage/msbuild-task.md b/docs/usage/msbuild-task.md index 6740577c5c..ff4b6ee00c 100644 --- a/docs/usage/msbuild-task.md +++ b/docs/usage/msbuild-task.md @@ -1,7 +1,7 @@ # MSBuild Task -The MSBuild Task for GitVersion — **GitVersionTask** — a simple solution if you -want to version your assemblies without writing any command line scripts or +The MSBuild Task for GitVersion — **GitVersionTask** — is a simple solution if +you want to version your assemblies without writing any command line scripts or modifying your build process. ## TL;DR From c23efa946f895008458dd682bc7b9073636ff308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Ulsberg?= Date: Tue, 23 Feb 2016 15:37:38 +0100 Subject: [PATCH 4/4] Added "shell" syntax identifier to Install-Package --- docs/usage/msbuild-task.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/usage/msbuild-task.md b/docs/usage/msbuild-task.md index ff4b6ee00c..967777b5fc 100644 --- a/docs/usage/msbuild-task.md +++ b/docs/usage/msbuild-task.md @@ -12,7 +12,9 @@ It works simply by installing the [GitVersionTask NuGet Package](https://www.nuget.org/packages/GitVersionTask/) into the project you want to have versioned by GitVersion: - Install-Package GitVersionTask +```shell +Install-Package GitVersionTask +``` ### Remove attributes