@@ -56,6 +56,7 @@ export default class extends DeploymentGenerator {
56
56
private configExists : boolean ;
57
57
private answers : AbapDeployConfigAnswersInternal ;
58
58
private projectType : DeployProjectType ;
59
+ private isAdp : boolean ;
59
60
60
61
/**
61
62
* Constructor for the ABAP deploy config generator.
@@ -174,24 +175,24 @@ export default class extends DeploymentGenerator {
174
175
}
175
176
if ( ! this . launchDeployConfigAsSubGenerator ) {
176
177
const appType = await getAppType ( this . destinationPath ( ) ) ;
177
- const isAdp = appType === 'Fiori Adaptation' ;
178
+ this . isAdp = appType === 'Fiori Adaptation' ;
178
179
const packageAdditionalValidation = {
179
- shouldValidatePackageForStartingPrefix : isAdp ,
180
- shouldValidatePackageType : isAdp ,
181
- shouldValidateFormatAndSpecialCharacters : isAdp
180
+ shouldValidatePackageForStartingPrefix : this . isAdp ,
181
+ shouldValidatePackageType : this . isAdp ,
182
+ shouldValidateFormatAndSpecialCharacters : this . isAdp
182
183
} ;
183
184
const promptOptions : AbapDeployConfigPromptOptions = {
184
- ui5AbapRepo : { hideIfOnPremise : isAdp } ,
185
- transportInputChoice : { hideIfOnPremise : isAdp } ,
185
+ ui5AbapRepo : { hideIfOnPremise : this . isAdp } ,
186
+ transportInputChoice : { hideIfOnPremise : this . isAdp } ,
186
187
packageAutocomplete : {
187
188
additionalValidation : packageAdditionalValidation
188
189
} ,
189
190
packageManual : {
190
191
additionalValidation : packageAdditionalValidation
191
192
} ,
192
- targetSystem : { additionalValidation : { shouldRestrictDifferentSystemType : isAdp } }
193
+ targetSystem : { additionalValidation : { shouldRestrictDifferentSystemType : this . isAdp } }
193
194
} ;
194
- const indexGenerationAllowed = this . indexGenerationAllowed && ! isAdp ;
195
+ const indexGenerationAllowed = this . indexGenerationAllowed && ! this . isAdp ;
195
196
const { prompts : abapDeployConfigPrompts , answers : abapAnswers = { } } = await getAbapQuestions ( {
196
197
appRootPath : this . destinationRoot ( ) ,
197
198
connectedSystem : this . options . connectedSystem ,
@@ -311,7 +312,8 @@ export default class extends DeploymentGenerator {
311
312
} as AbapDeployConfig ,
312
313
{
313
314
baseFile : this . options . base ,
314
- deployFile : this . options . config
315
+ deployFile : this . options . config ,
316
+ addBuildToUndeployScript : ! this . isAdp
315
317
} ,
316
318
this . fs
317
319
) ;
0 commit comments