File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
packages/@apphosting/adapter-angular/src Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 44 checkBuildConditions ,
55 validateOutputDirectory ,
66 parseOutputBundleOptions ,
7+ outputBundleExists
78} from "../utils.js" ;
89import { getBuildOptions , runBuild } from "@apphosting/common" ;
910
@@ -22,7 +23,9 @@ if (!output) {
2223 throw new Error ( "No output from Angular build command, expecting a build manifest file." ) ;
2324}
2425const outputBundleOptions = parseOutputBundleOptions ( output ) ;
25- const root = process . cwd ( ) ;
26- await generateBuildOutput ( root , outputBundleOptions , process . env . FRAMEWORK_VERSION ) ;
27-
28- await validateOutputDirectory ( outputBundleOptions ) ;
26+ if ( ! outputBundleExists ( outputBundleOptions ) ) {
27+ const root = process . cwd ( ) ;
28+ await generateBuildOutput ( root , outputBundleOptions , process . env . FRAMEWORK_VERSION ) ;
29+
30+ await validateOutputDirectory ( outputBundleOptions ) ;
31+ }
Original file line number Diff line number Diff line change @@ -226,3 +226,10 @@ export const isMain = (meta: ImportMeta) => {
226226 if ( ! process . argv [ 1 ] ) return false ;
227227 return process . argv [ 1 ] === fileURLToPath ( meta . url ) ;
228228} ;
229+
230+ export const outputBundleExists = ( outputBundleOptions : OutputBundleOptions ) => {
231+ if ( existsSync ( dirname ( outputBundleOptions . bundleYamlPath ) ) ) {
232+ return true ;
233+ }
234+ return false ;
235+ }
You can’t perform that action at this time.
0 commit comments