Skip to content

Commit

Permalink
NSwag v14 (preview) (#3758)
Browse files Browse the repository at this point in the history
* v14

* Replace DotLiquid with Fluid

* update templates to follow strict liquid syntax
* net461 minimum full framework

* Fixes

* Refactoring

* Fix tests

* Remove legacy web api

* Update

* Fixes

* Fix

* Fixes

* Fix

* Remove .net 2.0 sample

* fix tests

* Upgrade to net462

* remove files

* fix dependencies

* update ui

* remove more unused code

* add support for preview publish

* use njs preview

* update dependencies

* up

* up

* fix build

* remove njs

* up

* up

* cleanup

* remove project

* use full version for npm

* add .net 7

* up

* remove .net 5

* up

* update launchsetings

* use njs p2

* fix

* Revert "update launchsetings"

This reverts commit 4755081.

* fix typo

* fix generator

* Revert "Revert "update launchsetings""

This reverts commit c8f634f.

* update njs

* disable npm publish for now

* dont publish previews to npm

* remove old sample projects

* update pipeline

* update build

* remove

* add libs

* fix build and add tests

* remove old targets

---------

Co-authored-by: Marko Lahma <marko.lahma@gmail.com>
Co-authored-by: Rico Suter <rico.suter@buhlergroup.com>
  • Loading branch information
3 people committed Sep 27, 2023
1 parent 6f5e5f9 commit e0814f9
Show file tree
Hide file tree
Showing 839 changed files with 1,892 additions and 222,522 deletions.
10 changes: 2 additions & 8 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,10 @@
"Clean",
"Compile",
"InstallDependencies",
"IntegrationTest",
"Pack",
"Publish",
"Restore",
"Samples",
"Test",
"UnitTest"
"Test"
]
}
},
Expand All @@ -114,13 +111,10 @@
"Clean",
"Compile",
"InstallDependencies",
"IntegrationTest",
"Pack",
"Publish",
"Restore",
"Samples",
"Test",
"UnitTest"
"Test"
]
}
},
Expand Down
1 change: 0 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ steps:
msbuildArchitecture: 'x86'
configuration: '$(BuildConfiguration)'


- task: VSTest@2
displayName: 'Run tests'
inputs:
Expand Down
3 changes: 0 additions & 3 deletions build/00_Install.bat

This file was deleted.

3 changes: 0 additions & 3 deletions build/01_Build.bat

This file was deleted.

3 changes: 0 additions & 3 deletions build/02_RunUnitTests.bat

This file was deleted.

3 changes: 0 additions & 3 deletions build/03_RunIntegrationTests.bat

This file was deleted.

3 changes: 0 additions & 3 deletions build/04_Publish.bat

This file was deleted.

4 changes: 2 additions & 2 deletions build/Build.Pack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public partial class Build
// logic from 01_Build.bat
Target Pack => _ => _
.DependsOn(Compile)
.After(Test, IntegrationTest, UnitTest, Samples)
.After(Test)
.Produces(ArtifactsDirectory / "*.*")
.Executes(() =>
{
Expand Down Expand Up @@ -123,7 +123,7 @@ public partial class Build
// patch npm version
var npmPackagesFile = SourceDirectory / "NSwag.Npm" / "package.json";
content = TextTasks.ReadAllText(npmPackagesFile);
content = Regex.Replace(content, @"""version"": "".*""", @"""version"": """ + VersionPrefix + @"""");
content = Regex.Replace(content, @"""version"": "".*""", @"""version"": """ + nugetVersion + @"""");
TextTasks.WriteAllText(npmPackagesFile, content);
// ZIP directories
Expand Down
22 changes: 13 additions & 9 deletions build/Build.Publish.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,21 @@ public partial class Build
Path.Combine(userDirectory, ".npmrc"),
"//registry.npmjs.org/:_authToken=" + NpmAuthToken + "\n");
var outputs = Npm("publish", SourceDirectory / "NSwag.Npm", logOutput: false);
foreach (var output in outputs.Where(o => !o.Text.Contains("npm notice")))
// do not publish preview packages to npm
if (string.IsNullOrEmpty(VersionSuffix))
{
if (output.Type == OutputType.Std)
{
Serilog.Log.Information(output.Text);
}
else
var outputs = Npm("publish", SourceDirectory / "NSwag.Npm", logOutput: false);
foreach (var output in outputs.Where(o => !o.Text.Contains("npm notice")))
{
Serilog.Log.Error(output.Text);
if (output.Type == OutputType.Std)
{
Serilog.Log.Information(output.Text);
}
else
{
Serilog.Log.Error(output.Text);
}
}
}
}
Expand Down
Loading

0 comments on commit e0814f9

Please sign in to comment.