Skip to content

Commit

Permalink
Add NuGet as Build step :)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmontemagno committed Dec 6, 2017
1 parent ae8b118 commit c866ee8
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,4 @@ __pycache__/
*.btm.cs
*.odx.cs
*.xsd.cs
src/.droidres/.monkeycache.droidres.db
8 changes: 1 addition & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@ configuration: Release
environment:
CAKE_SETTINGS_SKIPVERIFICATION: true
ANDROID_HOME: 'C:\Program Files (x86)\Android\android-sdk\'
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
build_script:
- cmd: >-
powershell .\build.ps1 -Target Default -Verbosity diagnostic
artifacts:
- path: ./Build/nuget/*.nupkg
- path: ./src/MonkeyCache/bin/Release/netstandard2.0/*.nupkg
name: NuGet
4 changes: 3 additions & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ Task ("NuGet")
});

//Build the component, which build samples, nugets, and libraries
Task ("Default").IsDependentOn("NuGet");
//Task ("Default").IsDependentOn("NuGet");

Task ("Default").IsDependentOn("Libraries");

Task ("Clean").Does (() =>
{
Expand Down
10 changes: 10 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,16 @@ $configFiles = Get-ChildItem . *.csproj -rec
$assemblyVersionString = "<AssemblyVersion>" + $newVersion + "</AssemblyVersion>"
$assemblyFileVersionString = "<AssemblyFileVersion>" + $newVersion + "</AssemblyFileVersion>"
$versionString = "<Version>" + $newVersion + "</Version>"

$packageString = "<PackageVersion>" + $newVersion + "</PackageVersion>"

foreach ($file in $configFiles)
{
(Get-Content $file.PSPath) |
Foreach-Object { $_ -replace "<PackageVersion>1.0.0.0</PackageVersion>", $packageString } |
Set-Content $file.PSPath
}

foreach ($file in $configFiles)
{
(Get-Content $file.PSPath) |
Expand Down
12 changes: 12 additions & 0 deletions src/MonkeyCache.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonkeyCache", "MonkeyCache\MonkeyCache.csproj", "{EA91CB9D-339A-410E-8EF0-8B765D3BFE3C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C6A331DA-BE42-4E98-AAAB-B246225B669E}"
ProjectSection(SolutionItems) = preProject
..\build.cake = ..\build.cake
..\appveyor.yml = ..\appveyor.yml
..\README.md = ..\README.md
..\LICENSE = ..\LICENSE
..\build.ps1 = ..\build.ps1
..\cake.packages.config = ..\cake.packages.config
..\build.sh = ..\build.sh
..\install-android-sdk.ps1 = ..\install-android-sdk.ps1
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
18 changes: 18 additions & 0 deletions src/MonkeyCache/MonkeyCache.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<AssemblyFileVersion>1.0.0.0</AssemblyFileVersion>
<Version>1.0.0.0</Version>
<PackOnBuild>true</PackOnBuild>
<PackageVersion>1.0.0.0</PackageVersion>
<Authors>James Montemagno</Authors>
<PackageIconUrl>https://raw.githubusercontent.com/jamesmontemagno/Xamarin-Templates/master/Templates/icons/plugin_icon_nuget.png</PackageIconUrl>
<NeutralLanguage>en</NeutralLanguage>
<PackageLicenseUrl>https://github.com/jamesmontemagno/MonkeyCache/blob/master/LICENSE</PackageLicenseUrl>
<Owners>James Montemagno</Owners>
<PackageProjectUrl>https://github.com/jamesmontemagno/MonkeyCache</PackageProjectUrl>
<Summary>The best cache that is always monkeying around with your data.</Summary>
<PackageTags>xamarin, windows, ios, android, cache, http</PackageTags>
<Title>MonkeyCache</Title>
<Description>The best cache that is always monkeying around with your data.</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NuGet.Build.Packaging" Version="0.2.0" />
</ItemGroup>
</Project>

0 comments on commit c866ee8

Please sign in to comment.