From 72dabb366456c3212f7aa89dbe5d35d080b52151 Mon Sep 17 00:00:00 2001 From: SteveSandersonMS Date: Mon, 13 Feb 2017 15:06:41 +0000 Subject: [PATCH] After building "dotnet new" package, put it in "artifacts" dir --- templates/package-builder/src/build/build.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/package-builder/src/build/build.ts b/templates/package-builder/src/build/build.ts index c1bfbfd..c9f98a0 100644 --- a/templates/package-builder/src/build/build.ts +++ b/templates/package-builder/src/build/build.ts @@ -193,6 +193,8 @@ function buildDotNetNewNuGetPackage() { // Clean up rimraf.sync('./tmp'); + + return glob.sync(path.join(outputRoot, './*.nupkg'))[0]; } function runAllPrepublishScripts() { @@ -226,7 +228,10 @@ rimraf.sync(distDir); mkdirp.sync(artifactsDir); runAllPrepublishScripts(); buildYeomanNpmPackage(yeomanOutputRoot); -buildDotNetNewNuGetPackage(); +const dotNetNewNupkgPath = buildDotNetNewNuGetPackage(); + +// Move the .nupkg file to the artifacts dir +fs.renameSync(dotNetNewNupkgPath, path.join(artifactsDir, path.basename(dotNetNewNupkgPath))); // Finally, create a .tar.gz file containing the built generator-aspnetcore-spa. // The CI system can treat this as the final built artifact.