Skip to content

Commit

Permalink
Merge pull request #25497 from mshima/blueprints-args
Browse files Browse the repository at this point in the history
Pass arguments to blueprints
  • Loading branch information
DanielFran authored Mar 15, 2024
2 parents f4892e6 + 1393d90 commit 349be3b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
8 changes: 7 additions & 1 deletion .github/actions/build-matrix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ inputs:
}}
outputs:
matrix:
description: 'Build Matrix'
description: 'Build matrix'
value: ${{ steps.build-matrix.outputs.matrix }}
empty-matrix:
description: 'Build matrix is empty'
value: ${{ steps.build-matrix.outputs.empty-matrix }}
skip-workflow:
description: 'Skip workflow'
value: ${{ inputs.skip-workflow }}
Expand Down Expand Up @@ -135,5 +138,8 @@ runs:
cat matrix.json >> $GITHUB_OUTPUT
echo '' >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
EMPTY_MATRIX=$(cat matrix.json | jq '.include | length == 0')
echo "empty-matrix=${EMPTY_MATRIX}" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
rm matrix.json
shell: bash
4 changes: 2 additions & 2 deletions .github/workflows/devserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.build.outputs.matrix }}
client: ${{ steps.build.outputs.client }}
empty-matrix: ${{ steps.build.outputs.empty-matrix }}
steps:
- name: 'SETUP: Checkout generator-jhipster'
uses: actions/checkout@v4
Expand All @@ -64,7 +64,7 @@ jobs:
strategy:
fail-fast: false
matrix: ${{fromJson(needs.build-matrix.outputs.matrix)}}
if: needs.build-matrix.outputs.client == 'true'
if: needs.build-matrix.outputs.empty-matrix != 'true'
steps:
#----------------------------------------------------------------------
# Install all tools and check configuration
Expand Down
1 change: 1 addition & 0 deletions generators/base/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@ export default class JHipsterBaseBlueprintGenerator<
const finalOptions: ComposeOptions = {
forwardOptions: true,
schedule: generator => (generator as any).sbsBlueprint,
generatorArgs: this._args,
...extraOptions,
generatorOptions: {
jhipsterContext: this,
Expand Down
4 changes: 1 addition & 3 deletions generators/languages/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ export default class LanguagesGenerator extends BaseApplicationGenerator {
async beforeQueue() {
this.supportedLanguages = supportedLanguages;
if (!this.fromBlueprint) {
this.composedBlueprints = await this.composeWithBlueprints('languages', {
generatorArgs: this.options.languages,
});
this.composedBlueprints = await this.composeWithBlueprints('languages');
}

if (!this.delegateToBlueprint) {
Expand Down

0 comments on commit 349be3b

Please sign in to comment.