Skip to content

Commit

Permalink
Merge pull request #114 from ethanmoffat/eolib_nuget
Browse files Browse the repository at this point in the history
Add nuget package generation for EOLib.* projects. Set assembly version number to pipeline version.
  • Loading branch information
ethanmoffat committed Mar 10, 2022
2 parents cd86d37 + 361accf commit e5a3118
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 222 deletions.
3 changes: 2 additions & 1 deletion EOLib.Config/EOLib.Config.csproj
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NoWarn>1591</NoWarn>
</PropertyGroup>
</Project>

0 comments on commit e5a3118

Please sign in to comment.