diff --git a/DotNetPlease.sln b/DotNetPlease.sln index 4e53631..7f319c4 100644 --- a/DotNetPlease.sln +++ b/DotNetPlease.sln @@ -11,7 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_", "_", "{515E17A9-0C5F-44 ProjectSection(SolutionItems) = preProject CONTRIBUTING.md = CONTRIBUTING.md DISCLAIMER = DISCLAIMER - GitVersion.yml = GitVersion.yml LICENSE = LICENSE NOTICE = NOTICE README.md = README.md diff --git a/DotNetPlease.sln.DotSettings b/DotNetPlease.sln.DotSettings index 81fc84a..25a4bca 100644 --- a/DotNetPlease.sln.DotSettings +++ b/DotNetPlease.sln.DotSettings @@ -30,6 +30,7 @@ to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + True True True True diff --git a/DotNetPlease/DotNetPlease.csproj b/DotNetPlease/DotNetPlease.csproj index d46848b..5b96475 100644 --- a/DotNetPlease/DotNetPlease.csproj +++ b/DotNetPlease/DotNetPlease.csproj @@ -5,12 +5,12 @@ net6.0 enable Debug;Release - 1.0.0 MorganStanley.DotNetPlease dotnet-please global tool for streamlining repetitive tasks around Visual Studio projects and solutions. Apache-2.0 true true + v @@ -24,10 +24,6 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - @@ -37,6 +33,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + @@ -47,4 +47,13 @@ + + + + <_Parameter1>PackageVersion + <_Parameter2>$(PackageVersion) + + + + diff --git a/DotNetPlease/Program.cs b/DotNetPlease/Program.cs index 0537870..fd86a23 100644 --- a/DotNetPlease/Program.cs +++ b/DotNetPlease/Program.cs @@ -11,6 +11,8 @@ // and limitations under the License. using System; +using System.Linq; +using System.Reflection; using System.Text; using System.Threading.Tasks; @@ -22,7 +24,7 @@ static Task Main(string[] args) { Console.OutputEncoding = Encoding.UTF8; Console.WriteLine("dotnet-please from Morgan Stanley"); - Console.WriteLine(GitVersionInformation.NuGetVersionV2); + Console.WriteLine(ReadVersion() ?? ""); Console.WriteLine("Visit us at https://github.com/morganstanley"); Console.WriteLine(); try @@ -36,5 +38,13 @@ static Task Main(string[] args) return Task.FromResult(e.HResult); } } + + static string? ReadVersion() + { + return Assembly.GetEntryAssembly() + .GetCustomAttributes() + .FirstOrDefault(a => a.Key == "PackageVersion") + ?.Value; + } } } \ No newline at end of file diff --git a/DotNetPlease/packages.lock.json b/DotNetPlease/packages.lock.json index de46a85..7b2a73b 100644 --- a/DotNetPlease/packages.lock.json +++ b/DotNetPlease/packages.lock.json @@ -2,12 +2,6 @@ "version": 1, "dependencies": { "net6.0": { - "GitVersion.MsBuild": { - "type": "Direct", - "requested": "[5.12.0, )", - "resolved": "5.12.0", - "contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA==" - }, "JetBrains.Annotations": { "type": "Direct", "requested": "[2019.1.3, )", @@ -94,6 +88,12 @@ "resolved": "6.0.0", "contentHash": "ip8jnL1aPiaPeKINCqaTEbvBFDmVx9dXQEBZ2HOBRXPD1eabGNqP/bKlsIcp7U2lGxiXd5xIhoFcmY8nM4Hdiw==" }, + "MinVer": { + "type": "Direct", + "requested": "[4.3.0, )", + "resolved": "4.3.0", + "contentHash": "YNVAW3loCFW4kTwensApaZUl+7xREK75QQNOFSbsbXx2sCSm9/IHBjUHsJGn3u0UA5r/sAqrdYBNUlOFfLhUrA==" + }, "NuGet.Versioning": { "type": "Direct", "requested": "[6.5.0, )", diff --git a/GitVersion.yml b/GitVersion.yml deleted file mode 100644 index ed16160..0000000 --- a/GitVersion.yml +++ /dev/null @@ -1,5 +0,0 @@ -mode: ContinuousDelivery -branches: {} -ignore: - sha: [] -merge-message-formats: {}