Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .blueprint/generate-sample/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const command = {
scope: 'generator',
},
},
import: ['app', 'workspaces'],
import: ['app', 'workspaces', 'generate-blueprint'],
} as const satisfies JHipsterCommandDefinition<any>;

export default command;
6 changes: 5 additions & 1 deletion .blueprint/generate-sample/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ export default class extends BaseGenerator<Config & { entities: string[] }> {
async generateYoRcSample() {
if (!this.sampleYorcFolder || this.sampleOnly) return;

await this.composeWithJHipster(GENERATOR_APP, { generatorOptions: { destinationRoot: this.projectFolder } });
const yoRc = (this.fs.readJSON(`${this.projectFolder}/.yo-rc.json`) as any)?.['generator-jhipster'] as unknown as
| typeof this.jhipsterConfig
| undefined;
const defaultCommand = yoRc?.defaultCommand ?? GENERATOR_APP;
await this.composeWithJHipster(defaultCommand, { generatorOptions: { destinationRoot: this.projectFolder } });
},
async updateVscodeWorkspace() {
if (this.global) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"additionalSubGenerators": "",
"baseName": "foo",
"cli": true,
"defaultCommand": "generate-blueprint",
"localBlueprint": false,
"generators": {
"client": {
Expand Down
2 changes: 1 addition & 1 deletion .blueprint/github-build-matrix/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class extends BaseGenerator {
disabled: !springBootDefaults,
},
'generate-blueprint': {
disabled: !generateBlueprint,
disabled: !generateBlueprint && !devBlueprint,
},
graalvm: {
disabled: !graalvm,
Expand Down
2 changes: 1 addition & 1 deletion .blueprint/github-build-matrix/support/git-changes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const patterns = {
ci: ['.github/{actions,workflows}/**', join(testIntegrationRelativeFolder, '{,jdl}samples/**')],
client: ['generators/{client,init,javascript-simple-application}/**'],
common: ['generators/{app,common,docker,languages}/**'],
devBlueprint: ['.blueprint/**'],
devBlueprint: ['.blueprint/generate-sample/**', '.blueprint/github-build-matrix/**'],
devserverWorkflow: ['.github/workflows/devserver.yml'],
e2e: ['generators/cypress/**'],
generateBlueprint: ['generators/{generate-blueprint,javascript-simple-application,ci-cd/generators/bootstrap}/**'],
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/generator-generate-blueprint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
defaults:
run:
working-directory: ${{ github.workspace }}/app
strategy:
matrix:
sample: [default]
if: >-
!contains(github.event.head_commit.message, '[ci skip]') &&
!contains(github.event.head_commit.message, '[skip ci]') &&
Expand Down Expand Up @@ -61,15 +64,16 @@ jobs:
- uses: jhipster/actions/build-jhipster-bom@v1
with:
jhipster-bom-ref: ${{ steps.jhipster-output.outputs.jhipster-bom-branch }}
- run: mkdir generator-jhipster-foo
working-directory: ${{ github.workspace }}
- name: 'GENERATION: generate blueprint'
run: |
cd ..
mkdir generator-jhipster-foo
cd generator-jhipster-foo
cp ${{ github.workspace }}/generator-jhipster/.blueprint/generate-sample/templates/test-integration/generate-blueprint-samples/default/.yo-rc.json .
jhipster.cjs generate-blueprint --force --link-jhipster-dependency --generate-snapshots
jhipster.cjs generate-sample generate-blueprint-samples/${{ matrix.sample }} --sample-yorc-folder --entities-sample none --link-jhipster-dependency --generate-snapshots
npm link
cat package.json
working-directory: ${{ github.workspace }}/generator-jhipster-foo
env:
JHI_FOLDER_APP: ${{ github.workspace }}/generator-jhipster-foo
- name: 'GENERATION: project'
run: jhipster-foo --defaults --client-test-frameworks cypress --skip-jhipster-dependencies
env:
Expand Down
Loading