diff --git a/CHANGELOG.md b/CHANGELOG.md
index cc15d14..b5773b2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
+## 4.0.0 - 2020-03-04
+
+### Changed
+
+* isCamelCase is now replaced by caseStrategy=CamelCase
+
+### Added
+
+* Added caseStrategy that accept CamelCase | PascalCase | SnakeCase
+
## 3.6.0 - 2019-10-24
### Added
diff --git a/build.fsx b/build.fsx
index 4ea5373..9791629 100644
--- a/build.fsx
+++ b/build.fsx
@@ -176,34 +176,36 @@ let needsPublishing (versionRegex: Regex) (newVersion: string) projFile =
let pushNuget (newVersion: string) (projFile: string) =
let versionRegex = Regex("(.*?)", RegexOptions.IgnoreCase)
- let nugetKey =
- match Environment.environVarOrNone "NUGET_KEY" with
- | Some nugetKey -> nugetKey
- | None -> failwith "The Nuget API key must be set in a NUGET_KEY environmental variable"
+ if needsPublishing versionRegex newVersion projFile then
- let needsPublishing = needsPublishing versionRegex newVersion projFile
+ let nugetKey =
+ match Environment.environVarOrNone "NUGET_KEY" with
+ | Some nugetKey -> nugetKey
+ | None -> failwith "The Nuget API key must be set in a NUGET_KEY environmental variable"
- (versionRegex, projFile) ||> Util.replaceLines (fun line _ ->
- versionRegex.Replace(line, "" + newVersion + "") |> Some)
+ (versionRegex, projFile) ||> Util.replaceLines (fun line _ ->
+ versionRegex.Replace(line, "" + newVersion + "") |> Some)
- DotNet.pack (fun p ->
- DotNet.Options.lift dotnetSdk.Value p
- )
- projFile
+ DotNet.pack (fun p ->
+ DotNet.Options.lift dotnetSdk.Value p
+ )
+ projFile
- let projDir = Path.GetDirectoryName(projFile)
+ let projDir = Path.GetDirectoryName(projFile)
- let files =
Directory.GetFiles(projDir > "bin" > "Release", "*.nupkg")
|> Array.find (fun nupkg -> nupkg.Contains(newVersion))
- |> fun x -> [x]
-
- if needsPublishing then
- Paket.pushFiles (fun o ->
- { o with ApiKey = nugetKey
- PublishUrl = "https://www.nuget.org/api/v2/package"
- WorkingDir = __SOURCE_DIRECTORY__ })
- files
+ |> (fun nupkg ->
+ DotNet.nugetPush (fun p ->
+ { p with
+ PushParams =
+ { p.PushParams with
+ ApiKey = Some nugetKey
+ Source = Some "nuget.org"
+ }
+ }
+ ) nupkg
+ )
let versionRegex = Regex("^## ?\\[?v?([\\w\\d.-]+\\.[\\w\\d.-]+[a-zA-Z0-9])\\]?", RegexOptions.IgnoreCase)
diff --git a/src/Thoth.Json.Net.fsproj b/src/Thoth.Json.Net.fsproj
index 439ed38..88a4486 100644
--- a/src/Thoth.Json.Net.fsproj
+++ b/src/Thoth.Json.Net.fsproj
@@ -6,7 +6,7 @@
https://github.com/thoth-org/Thoth.Json.Net
fsharp;json
Maxime Mangel
- 3.6.0
+ 4.0.0
netstandard2.0;net46