Skip to content

Commit

Permalink
generate-blueprint: store current jhipsterVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Sep 23, 2024
1 parent 955ba29 commit 8bbf27d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion generators/base-core/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export default class CoreGenerator extends YeomanGenerator<JHipsterGeneratorOpti
!this.options.reproducibleTests &&
!this.jhipsterConfig.jhipsterVersion
) {
this.jhipsterConfig.jhipsterVersion = packageJson.version;
this.storeCurrentJHipsterVersion();
}
}

Expand Down Expand Up @@ -234,6 +234,10 @@ export default class CoreGenerator extends YeomanGenerator<JHipsterGeneratorOpti
return super.usage().replace('yo jhipster:', 'jhipster ');
}

storeCurrentJHipsterVersion(): void {
this.jhipsterConfig.jhipsterVersion = packageJson.version;
}

/**
* @deprecated
*/
Expand Down
3 changes: 3 additions & 0 deletions generators/generate-blueprint/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ export default class extends BaseGenerator {

get composing() {
return this.asComposingTaskGroup({
storeCurrentVersion() {
this.storeCurrentJHipsterVersion();
},
async compose() {
if (this.jhipsterConfig[LOCAL_BLUEPRINT_OPTION]) return;
const initGenerator = await this.composeWithJHipster(GENERATOR_INIT, { generatorOptions: { packageJsonType: 'module' } });
Expand Down

0 comments on commit 8bbf27d

Please sign in to comment.