-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from mshima/badges
Update badges
- Loading branch information
Showing
43 changed files
with
1,087 additions
and
428 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
'update-readme': { | ||
description: 'Run update-readme sub-generator (builds blueprint)', | ||
}, | ||
}; |
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,17 @@ | ||
/** | ||
* @type {import('generator-jhipster').JHipsterCommandDefinition} | ||
*/ | ||
const command = { | ||
options: {}, | ||
configs: { | ||
main: { | ||
desc: 'Regenerate generator-jhispter references in README.md', | ||
cli: { | ||
type: Boolean, | ||
}, | ||
scope: 'generator', | ||
}, | ||
}, | ||
}; | ||
|
||
export default command; |
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,74 @@ | ||
import { readdir } from 'fs/promises'; | ||
import { parse } from 'yaml'; | ||
import cronParser from 'cron-parser'; | ||
import command from './command.mjs'; | ||
import { basename, join } from 'path'; | ||
|
||
export default async env => { | ||
const BaseApplicationGenerator = await env.requireGenerator('jhipster:base-application'); | ||
return class extends BaseApplicationGenerator { | ||
main; | ||
context = {}; | ||
|
||
get [BaseApplicationGenerator.INITIALIZING]() { | ||
return this.asInitializingTaskGroup({ | ||
async initializingTemplateTask() { | ||
this.parseJHipsterCommand(command); | ||
}, | ||
}); | ||
} | ||
|
||
get [BaseApplicationGenerator.PROMPTING]() { | ||
return this.asPromptingTaskGroup({ | ||
async promptingTemplateTask() {}, | ||
}); | ||
} | ||
|
||
get [BaseApplicationGenerator.LOADING]() { | ||
return this.asLoadingTaskGroup({ | ||
async loadingTemplateTask() { | ||
const workflowsPath = this.templatePath('../../../.github/workflows'); | ||
const workflows = await readdir(workflowsPath); | ||
this.context.workflows = workflows | ||
.map(workflow => ({ workflow, content: parse(this.readDestination(join(workflowsPath, workflow))) })) | ||
.map(workflow => ({ ...workflow, workflowName: basename(workflow.workflow) })); | ||
|
||
if (this.main) { | ||
this.context.workflows = this.context.workflows.filter( | ||
({ workflowName }) => | ||
workflowName.startsWith('ng-') || | ||
workflowName.startsWith('react-') || | ||
workflowName.startsWith('vue-') || | ||
workflowName.startsWith('elasticsearch') || | ||
workflowName.startsWith('monolith-') || | ||
workflowName.startsWith('no-') || | ||
workflowName.startsWith('ms-') || | ||
workflowName.startsWith('docker-') || | ||
workflowName.startsWith('windows'), | ||
); | ||
} else { | ||
this.context.workflows = this.context.workflows.filter(workflow => workflow.content.on.schedule?.[0]?.cron); | ||
} | ||
for (const workflow of this.context.workflows) { | ||
const cron = cronParser.parseExpression(workflow.content.on.schedule[0].cron); | ||
workflow.cron = `${cron.fields.hour[0].toString().padStart(2, '0')}:${cron.fields.minute[0].toString().padStart(2, '0')}`; | ||
} | ||
this.context.workflows.sort((a, b) => a.cron.localeCompare(b.cron)); | ||
}, | ||
}); | ||
} | ||
|
||
get [BaseApplicationGenerator.WRITING]() { | ||
return this.asWritingTaskGroup({ | ||
async writingTemplateTask() { | ||
await this.writeFiles({ | ||
sections: { | ||
files: [{ templates: [this.main ? 'README.main.md' : 'README.md'] }], | ||
}, | ||
context: this.context, | ||
}); | ||
}, | ||
}); | ||
} | ||
}; | ||
}; |
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,2 @@ | ||
export { default as createGenerator } 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
| Pipeline Status | | ||
| :--- | | ||
<%_ for (const workflow of workflows) { _%> | ||
| [![<%- workflow.content.name %>][<%- workflow.workflowName %>-badge]][<%- workflow.workflowName %>-link] | | ||
<%_ } _%> | ||
|
||
<%_ for (const workflow of workflows) { _%> | ||
[<%- workflow.workflowName %>-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/<%- workflow.workflowName %>/badge.svg | ||
[<%- workflow.workflowName %>-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/<%- workflow.workflowName %> | ||
<%_ } _%> |
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,16 @@ | ||
# jhipster-daily-builds | ||
|
||
## GitHub Actions builds | ||
|
||
Please note shown times below are in UTC. | ||
|
||
| Pipeline Status | At | | ||
| :--- | :--- | | ||
<%_ for (const workflow of workflows) { _%> | ||
| [![<%- workflow.content.name %>][<%- workflow.workflowName %>-badge]][<%- workflow.workflowName %>-link] | <%- workflow.cron %> | | ||
<%_ } _%> | ||
|
||
<%_ for (const workflow of workflows) { _%> | ||
[<%- workflow.workflowName %>-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/<%- workflow.workflowName %>/badge.svg | ||
[<%- workflow.workflowName %>-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/<%- workflow.workflowName %> | ||
<%_ } _%> |
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
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
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
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
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
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
Oops, something went wrong.