-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generate-blueprint: improve dev-blueprint and ci workflow (#27765)
- Loading branch information
Showing
13 changed files
with
149 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 19 additions & 22 deletions
41
generators/generate-blueprint/templates/.blueprint/generate-sample/generator.mjs.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
generators/generate-blueprint/templates/.blueprint/github-build-matrix/build-matrix.mjs.ejs
This file was deleted.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
generators/generate-blueprint/templates/.blueprint/github-build-matrix/command.mjs.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<%# | ||
Copyright 2013-2024 the original author or authors from the JHipster project. | ||
This file is part of the JHipster project, see https://www.jhipster.tech/ | ||
for more information. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
https://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
-%> | ||
/** | ||
* @type {import('generator-jhipster').JHipsterCommandDefinition} | ||
*/ | ||
const command = { | ||
configs: { | ||
samplesFolder: { | ||
description: 'Samples folder', | ||
cli: { | ||
type: String, | ||
}, | ||
scope: 'generator', | ||
}, | ||
samplesGroup: { | ||
description: 'Samples Group', | ||
argument: { | ||
type: String, | ||
}, | ||
default: 'samples', | ||
scope: 'generator', | ||
}, | ||
}, | ||
options: {}, | ||
}; | ||
|
||
export default command; |
30 changes: 23 additions & 7 deletions
30
generators/generate-blueprint/templates/.blueprint/github-build-matrix/generator.mjs.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...rators/generate-blueprint/templates/.blueprint/github-build-matrix/generator.spec.mjs.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { basename, dirname, join } from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
import { beforeAll, describe, expect, it } from 'vitest'; | ||
import { getGithubSamplesGroups, defaultHelpers as helpers, runResult } from 'generator-jhipster/testing'; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = dirname(__filename); | ||
|
||
const generator = basename(__dirname); | ||
|
||
describe(`generator - ${generator}`, async () => { | ||
const groups = await getGithubSamplesGroups(join(__dirname, '../generate-sample/templates/')); | ||
for (const workflow of groups.map(sample => sample.split('.')[0])) { | ||
describe(`with ${workflow}`, () => { | ||
beforeAll(async () => { | ||
await helpers.runJHipster(join(__dirname, 'index.mjs'), { useEnvironmentBuilder: true }).withArguments(workflow); | ||
}); | ||
|
||
it('should match matrix value', () => { | ||
expect(runResult.generator.matrix).toMatchSnapshot(); | ||
}); | ||
}); | ||
} | ||
}); |
1 change: 1 addition & 0 deletions
1
generators/generate-blueprint/templates/.blueprint/github-build-matrix/index.mjs.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { default } from './generator.mjs'; | ||
export { default as command } from './command.mjs'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters