Skip to content

Commit

Permalink
generate sample adjusts
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Jan 28, 2025
1 parent 997c9a6 commit 3df5bc2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .blueprint/generate-sample2/command.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ const command = {
description: 'Sample name to generate',
cli: {
type: String,
env: 'JHI_APP',
},
configure: gen => {
if (gen.appSample && gen.appSample !== 'jdl') {
Expand All @@ -87,11 +86,14 @@ const command = {
description: 'Generate JDL samples',
cli: {
type: String,
env: 'JHI_JDL_APP',
},
configure: gen => {
if (gen.jdlSamples) {
const [app, ...entities] = gen.jdlSamples.split(',');
let { jdlSamples } = gen;
if (!jdlSamples && gen.appSample) {
jdlSamples = workflowSamples[gen.appSample]?.['jdl-samples'];
}
if (jdlSamples) {
const [app, ...entities] = jdlSamples.split(',');
gen.samplesFolder = `jdl-samples/${app}`;
gen.generatorArgs = '*.jdl';
if (entities && entities.length > 0) {
Expand All @@ -104,7 +106,6 @@ const command = {
entityType: {
description: 'Entity type to generate',
cli: {
env: 'JHI_ENTITY',
type: String,
},
configure: gen => {
Expand All @@ -123,7 +124,6 @@ const command = {
description: 'Generate JDL entities samples',
cli: {
type: String,
env: 'JHI_JDL_ENTITY',
},
configure: gen => {
let { jdlEntities } = gen;
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/angular.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
#----------------------------------------------------------------------
# Install JHipster and generate project+entities
#----------------------------------------------------------------------
- run: cli.cjs generate-sample2 --skip-jhipster-dependencies --skip-install --skip-ktlint-format ${{ matrix.extra-args }} ${{ matrix.new-extra-args }}
- run: cli.cjs generate-sample2 --app-sample $JHI_APP --skip-jhipster-dependencies --skip-install --skip-ktlint-format ${{ matrix.extra-args }} ${{ matrix.new-extra-args }}
- run: cli.cjs info
#----------------------------------------------------------------------
# Detect changes against base commit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
#----------------------------------------------------------------------
# Install JHipster and generate project+entities
#----------------------------------------------------------------------
- run: cli.cjs generate-sample2 --skip-jhipster-dependencies --skip-install --skip-ktlint-format ${{ matrix.extra-args }} ${{ matrix.new-extra-args }}
- run: cli.cjs generate-sample2 --app-sample $JHI_APP --skip-jhipster-dependencies --skip-install --skip-ktlint-format ${{ matrix.extra-args }} ${{ matrix.new-extra-args }}
- run: cli.cjs info
#----------------------------------------------------------------------
# Detect changes against base commit
Expand Down

0 comments on commit 3df5bc2

Please sign in to comment.