Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nuget package generation for EOLib.* projects. Set assembly version number to pipeline version. #114

Merged
merged 10 commits into from
Mar 10, 2022
Merged
3 changes: 2 additions & 1 deletion EOLib.Config/EOLib.Config.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../common.targets" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>..\bin\$(Configuration)\lib\</OutputPath>
<Description>Library for interacting with Endless Online configuration files</Description>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
<DefineConstants>$(DefineConstants);LINUX</DefineConstants>
Expand Down
35 changes: 0 additions & 35 deletions EOLib.Config/Properties/AssemblyInfo.cs

This file was deleted.

3 changes: 2 additions & 1 deletion EOLib.Graphics/EOLib.Graphics.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../common.targets" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>..\bin\$(Configuration)\lib\</OutputPath>
<Description>Library for interacting with Endless Online gfx files</Description>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
<DefineConstants>$(DefineConstants);LINUX</DefineConstants>
Expand Down
35 changes: 0 additions & 35 deletions EOLib.Graphics/Properties/AssemblyInfo.cs

This file was deleted.

3 changes: 2 additions & 1 deletion EOLib.IO/EOLib.IO.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../common.targets" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>..\bin\$(Configuration)\lib\</OutputPath>
<Description>Library for interacting with Endless Online pub and map files</Description>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
<DefineConstants>$(DefineConstants);LINUX</DefineConstants>
Expand Down
35 changes: 0 additions & 35 deletions EOLib.IO/Properties/AssemblyInfo.cs

This file was deleted.

3 changes: 2 additions & 1 deletion EOLib.Localization/EOLib.Localization.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../common.targets" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>..\bin\$(Configuration)\lib\</OutputPath>
<Description>Library for interacting with Endless Online edf files</Description>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
<DefineConstants>$(DefineConstants);LINUX</DefineConstants>
Expand Down
35 changes: 0 additions & 35 deletions EOLib.Localization/Properties/AssemblyInfo.cs

This file was deleted.

3 changes: 2 additions & 1 deletion EOLib.Logger/EOLib.Logger.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../common.targets" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>..\bin\$(Configuration)\lib\</OutputPath>
<Description>Library for interacting with Endless Online log files</Description>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
<DefineConstants>$(DefineConstants);LINUX</DefineConstants>
Expand Down
35 changes: 0 additions & 35 deletions EOLib.Logger/Properties/AssemblyInfo.cs

This file was deleted.

3 changes: 2 additions & 1 deletion EOLib/EOLib.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../common.targets" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>..\bin\$(Configuration)\lib\</OutputPath>
<Description>Base library for Endless Online development</Description>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
<DefineConstants>$(DefineConstants);LINUX</DefineConstants>
Expand Down
35 changes: 0 additions & 35 deletions EOLib/Properties/AssemblyInfo.cs

This file was deleted.

60 changes: 54 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 0.4.$(rev:rrr)
name: 0.5.$(rev:rrr)

trigger:
- master
Expand Down Expand Up @@ -41,7 +41,44 @@ steps:
displayName: 'Install .Net 6 runtime/sdk'
inputs:
version: 6.0.x

- task: Assembly-Info-NetCore@3
displayName: 'Set assembly version and copyright info'
inputs:
Path: '$(Build.SourcesDirectory)'
FileNames: '**/*.csproj'
InsertAttributes: true
FileEncoding: 'auto'
WriteBOM: false
GenerateDocumentationFile: 'false'
Authors: 'Ethan Moffat'
Copyright: 'Copyright © 2014-2022 Ethan Moffat'
VersionNumber: '$(Build.BuildNumber)'
FileVersionNumber: '$(Build.BuildNumber)'
InformationalVersion: '$(Build.BuildNumber)'
LogLevel: 'verbose'
FailOnWarning: false
DisableTelemetry: false
- task: Assembly-Info-NetCore@3
displayName: 'Set nuget package properties'
inputs:
Path: '$(Build.SourcesDirectory)'
FileNames: |
**/EOLib*.csproj
!**/EOLib.*Test.csproj
InsertAttributes: true
FileEncoding: 'auto'
WriteBOM: false
GeneratePackageOnBuild: 'true'
PackageRequireLicenseAcceptance: 'false'
PackageLicenseExpression: 'MIT'
PackageProjectUrl: 'https://github.com/ethanmoffat/EndlessClient'
RepositoryUrl: 'https://github.com/ethanmoffat/EndlessClient'
RepositoryType: 'git'
PackageTags: 'endless-online eo'
PackageVersion: '$(Build.BuildNumber)'
LogLevel: 'verbose'
FailOnWarning: false
DisableTelemetry: false
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
Expand Down Expand Up @@ -71,19 +108,30 @@ steps:
displayName: 'ZIP EndlessClient'
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/bin/$(buildConfiguration)/client/$(dropDir)/
archiveFile: $(Build.ArtifactStagingDirectory)/EndlessClient.$(friendlyPlatform).zip
archiveFile: $(Build.ArtifactStagingDirectory)/zip/EndlessClient.$(friendlyPlatform).zip
- task: ArchiveFiles@2
displayName: 'ZIP EOBot'
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/bin/$(buildConfiguration)/utils/EOBot/net6.0/
archiveFile: $(Build.ArtifactStagingDirectory)/EOBot.$(friendlyPlatform).zip

archiveFile: $(Build.ArtifactStagingDirectory)/zip/EOBot.$(friendlyPlatform).zip
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts'
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)
PathtoPublish: $(Build.ArtifactStagingDirectory)/zip
ArtifactName: EndlessClient

- task: CopyFiles@2
displayName: 'Copy nuget packages'
inputs:
SourceFolder: '$(Build.SourcesDirectory)/bin/$(buildConfiguration)/'
Contents: '**/*.nupkg'
TargetFolder: '$(Build.ArtifactStagingDirectory)/nuget'
- task: PublishBuildArtifacts@1
displayName: 'Publish nuget Artifacts'
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)/nuget
ArtifactName: nuget.$(friendlyPlatform)

- script: |
git tag build/$(Build.BuildNumber)
git push origin build/$(Build.BuildNumber)
Expand Down
5 changes: 5 additions & 0 deletions common.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NoWarn>1591</NoWarn>
</PropertyGroup>
</Project>