build.js 946 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. var bt = require('./buildtools/buildTools.js')
  2. // Load version info
  3. bt.version();
  4. if (bt.options.official)
  5. {
  6. // Check everything committed
  7. bt.git_check();
  8. // Clock version
  9. bt.clock_version();
  10. // Run Tests
  11. bt.dntest("Release", "Topten.JsonKit.Test");
  12. // Force clean
  13. bt.options.clean = true;
  14. bt.clean("./Build");
  15. }
  16. // Build
  17. bt.dnbuild("Release", "Topten.JsonKit");
  18. // Build NuGet Package?
  19. if (bt.options.official || bt.options.nuget)
  20. {
  21. bt.signfile([
  22. "Build\\Release\\Topten.JsonKit\\netcoreapp2.0\\Topten.JsonKit.dll",
  23. "Build\\Release\\Topten.JsonKit\\net46\\Topten.JsonKit.dll",
  24. ], "JsonKit JSON Serialization Library");
  25. bt.nupack("Topten.JsonKit.nuspec", "./Build");
  26. }
  27. if (bt.options.official)
  28. {
  29. // Tag and commit
  30. bt.git_tag();
  31. // Push nuget package
  32. bt.nupush(`./build/*.${bt.options.version.build}.nupkg`, "http://nuget.toptensoftware.com/v3/index.json");
  33. }