Skip to content

Commit

Permalink
Merge pull request #75 from ADAPT/develop
Browse files Browse the repository at this point in the history
Deployment fixes
  • Loading branch information
knelson-farmbeltnorth authored May 11, 2021
2 parents 0225b29 + c9e7d2a commit d0da350
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 27 deletions.
23 changes: 5 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,23 @@
language: csharp
dist: bionic
dotnet: 2.1.4

env:
- FrameworkPathOverride=/usr/lib/mono/4.5/

jobs:
include:
- stage: Run Tests
before_install:
- wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
- sudo dpkg -i packages-microsoft-prod.deb
- sudo apt-get update
- sudo apt-get install -y dotnet-sdk-3.1
- sudo apt-get install -y dotnet-sdk-2.1
- stage: test
mono: none
script:
- dotnet --list-sdks
- dotnet test ./PluginTest/PluginTest.csproj -c Release
- dotnet test ./AcceptanceTest/AcceptanceTest.csproj -c Release

- stage: deploy
if: tag =~ ^v\d+\.\d+\.\d+
before_install:
- wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
- sudo dpkg -i packages-microsoft-prod.deb
- sudo apt-get update
- sudo apt-get install -y dotnet-sdk-3.1
- sudo apt-get install -y dotnet-sdk-2.1
mono: none
mono: 5.8.0
script:
- VERSION=$(echo $TRAVIS_TAG | grep -i -P -o '(?<=^v)\d+\.\d+\.\d+(?:.+)?$'); VERSION_NUMBER=$(echo $VERSION | grep -i -P -o '^\d+\.\d+\.\d+')
- dotnet build ./ADMPlugin.sln -c Release /p:Version=$VERSION /p:FileVersion=$VERSION_NUMBER.$TRAVIS_BUILD_NUMBER
- dotnet pack --output ./dist -p:PackageVersion $VERSION
- mkdir -p ./dist; nuget pack ./AgGatewayADMPlugin.nuspec -outputdirectory ./dist -version $VERSION
- if [ -n "${NUGET_API_KEY}" ]; then dotnet nuget push ./dist/AgGatewayADMPlugin.${VERSION}.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json; fi
deploy:
provider: releases
Expand Down
5 changes: 1 addition & 4 deletions ADMPlugin/ADMPlugin.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net451</TargetFrameworks>
<Version>1.0.0</Version>
Expand All @@ -12,9 +12,6 @@
<PackageId>AgGateway.ADAPT.ADMPlugin</PackageId>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</PropertyGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net4')) AND '$(MSBuildRuntimeType)' == 'Core' AND '$(OS)' != 'Windows_NT'">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AgGatewayADAPTFramework" Version="2.4.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
Expand Down
4 changes: 2 additions & 2 deletions ADMPlugin/Serializers/VersionInfoSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public AdmVersionInfo Deserialize(string dataPath)
}

var fileString = File.ReadAllText(filePath);

var model = JsonConvert.DeserializeObject<AdmVersionInfo>(fileString, new NetCoreApp31CompatibleVersionConverter());
var model = JsonConvert.DeserializeObject<AdmVersionInfo>(fileString);
return model;
}
}
Expand Down
2 changes: 1 addition & 1 deletion AcceptanceTest/AcceptanceTest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<Version>0.0.0</Version>
<NeutralLanguage></NeutralLanguage>
<Copyright>Copyright (C) 2015-19 AgGateway and ADAPT Contributors</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion PluginTest/PluginTest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<Version>0.0.0</Version>
<NeutralLanguage></NeutralLanguage>
<Copyright>Copyright (C) 2015-19 AgGateway and ADAPT Contributors</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion TestUtilities/TestUtilities.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<Copyright>Copyright (C) 2015-19 AgGateway and ADAPT Contributors</Copyright>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<Version>0.0.0</Version>
Expand Down

0 comments on commit d0da350

Please sign in to comment.