build.js 701 B

12345678910111213141516171819202122232425262728293031
  1. var bt = require('./buildtools/buildTools.js')
  2. if (bt.options.official)
  3. {
  4. // Check everything committed
  5. bt.git_check();
  6. // Clock version
  7. bt.clock_version();
  8. // Clean build directory
  9. bt.run("rm -rf ./Build");
  10. }
  11. // Build
  12. bt.run("dotnet build Topten.JsonKit\\Topten.JsonKit.csproj -c Release")
  13. bt.run("dotnet build Topten.JsonKit\\Topten.JsonKit.Lite.csproj -c Release")
  14. if (bt.options.official)
  15. {
  16. // Run tests
  17. bt.run("dotnet test Topten.JsonKit.Test -c Release");
  18. // Tag and commit
  19. bt.git_tag();
  20. // Push nuget package
  21. bt.run(`dotnet nuget push`,
  22. `./Build/Release/*.${bt.options.version.build}.nupkg`,
  23. `--source nuget.org`);
  24. }