Saltstack Official FirewallD Formula
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

107 lines
3.6KB

  1. module.exports = {
  2. branch: 'master',
  3. plugins: [
  4. ['@semantic-release/commit-analyzer', {
  5. preset: 'angular',
  6. releaseRules: './release-rules.js',
  7. }],
  8. '@semantic-release/release-notes-generator',
  9. ['@semantic-release/changelog', {
  10. changelogFile: 'CHANGELOG.md',
  11. changelogTitle: '# Changelog',
  12. }],
  13. ['@semantic-release/exec', {
  14. prepareCmd: 'sh ./pre-commit_semantic-release.sh ${nextRelease.version}',
  15. }],
  16. ['@semantic-release/git', {
  17. assets: ['*.md', 'docs/*.rst', 'FORMULA'],
  18. }],
  19. '@semantic-release/github',
  20. ],
  21. generateNotes: {
  22. preset: 'angular',
  23. writerOpts: {
  24. // Required due to upstream bug preventing all types being displayed.
  25. // Bug: https://github.com/conventional-changelog/conventional-changelog/issues/317
  26. // Fix: https://github.com/conventional-changelog/conventional-changelog/pull/410
  27. transform: (commit, context) => {
  28. const issues = []
  29. commit.notes.forEach(note => {
  30. note.title = `BREAKING CHANGES`
  31. })
  32. // NOTE: Any changes here must be reflected in `CONTRIBUTING.md`.
  33. if (commit.type === `feat`) {
  34. commit.type = `Features`
  35. } else if (commit.type === `fix`) {
  36. commit.type = `Bug Fixes`
  37. } else if (commit.type === `perf`) {
  38. commit.type = `Performance Improvements`
  39. } else if (commit.type === `revert`) {
  40. commit.type = `Reverts`
  41. } else if (commit.type === `docs`) {
  42. commit.type = `Documentation`
  43. } else if (commit.type === `style`) {
  44. commit.type = `Styles`
  45. } else if (commit.type === `refactor`) {
  46. commit.type = `Code Refactoring`
  47. } else if (commit.type === `test`) {
  48. commit.type = `Tests`
  49. } else if (commit.type === `build`) {
  50. commit.type = `Build System`
  51. // } else if (commit.type === `chore`) {
  52. // commit.type = `Maintenance`
  53. } else if (commit.type === `ci`) {
  54. commit.type = `Continuous Integration`
  55. } else {
  56. return
  57. }
  58. if (commit.scope === `*`) {
  59. commit.scope = ``
  60. }
  61. if (typeof commit.hash === `string`) {
  62. commit.shortHash = commit.hash.substring(0, 7)
  63. }
  64. if (typeof commit.subject === `string`) {
  65. let url = context.repository
  66. ? `${context.host}/${context.owner}/${context.repository}`
  67. : context.repoUrl
  68. if (url) {
  69. url = `${url}/issues/`
  70. // Issue URLs.
  71. commit.subject = commit.subject.replace(/#([0-9]+)/g, (_, issue) => {
  72. issues.push(issue)
  73. return `[#${issue}](${url}${issue})`
  74. })
  75. }
  76. if (context.host) {
  77. // User URLs.
  78. commit.subject = commit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => {
  79. if (username.includes('/')) {
  80. return `@${username}`
  81. }
  82. return `[@${username}](${context.host}/${username})`
  83. })
  84. }
  85. }
  86. // remove references that already appear in the subject
  87. commit.references = commit.references.filter(reference => {
  88. if (issues.indexOf(reference.issue) === -1) {
  89. return true
  90. }
  91. return false
  92. })
  93. return commit
  94. },
  95. },
  96. },
  97. };