fix(appengine): Restore build products to previous location (#6687)

Modify the prepareDemos script to copy the messages and compressed
files to their previous locations in the deploy directory, to
fix 404 errors on devsite that we can't immediately fix by pushing
devsite.
This commit is contained in:
Christopher Allen
2022-12-07 19:43:50 +00:00
committed by GitHub
parent fd92cd7824
commit 983a8be441

View File

@@ -51,10 +51,34 @@ function copyStaticSrc(done) {
* Prerequisite: clean, build.
*/
function copyBuilt(done) {
return gulp.src(['build/msg/**/*', 'dist/*_compressed.js*'], {base: '.'})
return gulp.src(['build/msg/*', 'dist/*_compressed.js*'], {base: '.'})
.pipe(gulp.dest(demoStaticTmpDir));
}
/**
* Copies compressed files into the places they used to be used from, for the
* benefit of our Developers site and (for now) any other websites that
* hotlink them. Delete this once devsite is fixed.
*
* Prerequisite: clean, build.
*/
function copyCompressedToOldLocation(done) {
return gulp.src(['dist/*_compressed.js*'])
.pipe(gulp.dest(demoStaticTmpDir));
}
/**
* Copies messages files into the places they used to be used from, for the
* benefit of our Developers site and (for now) any other websites that
* hotlink them. Delete this once devsite is fixed.
*
* Prerequisite: clean, build.
*/
function copyMessagesToOldLocation(done) {
return gulp.src(['build/msg/*'])
.pipe(gulp.dest(demoStaticTmpDir + '/msg/js'));
}
/**
* Copies appengine files into deploy directory.
*/
@@ -153,7 +177,9 @@ const prepareDemos = gulp.series(
gulp.parallel(buildTasks.cleanBuildDir,
packageTasks.cleanReleaseDir),
buildTasks.build,
copyBuilt),
gulp.parallel(copyBuilt,
copyCompressedToOldLocation,
copyMessagesToOldLocation)),
copyPlaygroundDeps));
/**