diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 461faff..7e9b3aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: deploy: needs: build name: Deploy Packages - runs-on: windows-latest + runs-on: ubuntu-latest steps: - name: Download Package artifact uses: actions/download-artifact@master diff --git a/Agoda.Frameworks.DB/SpParameter.cs b/Agoda.Frameworks.DB/SpParameter.cs index d4055e1..4da3f13 100644 --- a/Agoda.Frameworks.DB/SpParameter.cs +++ b/Agoda.Frameworks.DB/SpParameter.cs @@ -52,7 +52,7 @@ public static string CreateCacheKey(this SpParameter[] parameters, string spName } return parameters? - .OrderBy(x => x.Name) + .OrderBy(x => x.Name, StringComparer.OrdinalIgnoreCase) .Aggregate( $"{dbPrefix}{spName}:", (seed, pair) => diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 9a0e3b8..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,23 +0,0 @@ -before_build: - - dotnet restore - -test: off - -image: Visual Studio 2017 - -build: - project: Agoda.LoadBalancing.sln - -after_build: - - ps: .\tools\publish.ps1 - -artifacts: - - path: '**\*.nupkg' - name: NugetPackage - -deploy: - provider: NuGet - api_key: - secure: g5JNOfRkIpNjLPxGk2yfmG+RLPRkhqT71N11Hfx9ieRb90bUnPl0grIJpmFvwz7k - skip_symbols: true - artifact: /.*\.nupkg/ diff --git a/tools/publish.ps1 b/tools/publish.ps1 deleted file mode 100644 index cdcabff..0000000 --- a/tools/publish.ps1 +++ /dev/null @@ -1,115 +0,0 @@ -#$ErrorActionPreference = "Stop" - -$version = $env:APPVEYOR_BUILD_VERSION - - -if(!$version) -{ - Write-Output "Missing version: $version" - Exit 1 -} - - -$branch = $env:APPVEYOR_REPO_BRANCH - - -if(!$branch) -{ - Write-Output "Missing branch: $branch" - Exit 1 -} - - -if($branch -ne "master") -{ - $version = "$version-alpha" -} - - -$scriptDir = Split-Path -Path (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent) -Parent -$toolsPath = Join-Path $scriptDir "tools" - -cd $toolsPath - -$deployables = @{ - "DB" = "Agoda.Frameworks.DB" - "Http" = "Agoda.Frameworks.Http" - "Http.AutoRestExt" = "Agoda.Frameworks.Http.AutoRestExt" - "LoadBalancing" = "Agoda.Frameworks.LoadBalancing" - "Grpc" = "Agoda.Frameworks.Grpc" -} - -function Configure_Meta($meta, $include, $v) { - if(![string]::IsNullOrWhiteSpace($include)){ - $dependency = $meta.OwnerDocument.CreateElement("dependency") - $id = $meta.OwnerDocument.CreateAttribute("id") - $id.Value = $include - $vrs = $meta.OwnerDocument.CreateAttribute("version") - $vrs.Value = $v - [void]$dependency.Attributes.Append($id) - [void]$dependency.Attributes.Append($vrs) - [void]$dependencies.AppendChild($dependency) - } -} - -function Append-FileNode($files, $file, $lib) { - $node = $files.OwnerDocument.CreateElement("file") - $src = $files.OwnerDocument.CreateAttribute("src") - $src.Value = $file.FullName - $target = $files.OwnerDocument.CreateAttribute("target") - $target.Value = $lib - [void]$node.Attributes.Append($src) - [void]$node.Attributes.Append($target) - [void]$files.AppendChild($node) -} - -$deployables.GetEnumerator() | % { - $name = $_.Value - $projectPath = Join-Path $scriptDir $name - $csProjPath = Join-Path $projectPath "$name.csproj" - [xml]$proj = gc $csProjPath -Raw - - cd $projectPath - $nuspecPath = Join-Path $projectPath "$name.nuspec" - if(Test-Path $nuspecPath) { - Remove-Item $nuspecPath - } - - nuget spec - [xml]$nuspec = gc $nuspecPath -Raw - $meta = $nuspec.package.metadata - $meta.id = $name - $meta.title = $name - $meta.version = $version - $meta.authors = [string]$proj.Project.PropertyGroup.Authors - $meta.owners = $meta.authors - $meta.projectUrl = [string]$proj.Project.PropertyGroup.PackageProjectUrl - $meta.description = [string]$proj.Project.PropertyGroup.Description - @("licenseUrl", "iconUrl", "tags", "releaseNotes") | % { - [void]$meta.RemoveChild($meta.SelectSingleNode($_)) - } - $dependencies = $meta.OwnerDocument.CreateElement("dependencies") - $files = $meta.OwnerDocument.CreateElement("files") - - $proj.Project.ItemGroup.PackageReference | % { - [string]$include = $_.Include - [string]$v = $_.Version - Configure_Meta $meta $include $v - } - - [void]$meta.AppendChild($dependencies) - - ls (Join-Path $projectPath "bin\Debug\net462\") -Filter "$name.*" | % { - Append-FileNode $files $_ "lib\Net462" - } - - ls (Join-Path $projectPath "bin\Debug\netstandard2.0\") -Filter "$name.*" | % { - Append-FileNode $files $_ "lib\netstandard2.0" - } - - [void]$nuspec.package.AppendChild($files) - - $nuspec.Save($nuspecPath) - - dotnet pack -c Release -p:PackageVersion=$version -} \ No newline at end of file