Commit 89a50e7e authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch 'custom-commit-msg' into 'master'

feat: make commit message configurable

See merge request to-be-continuous/semantic-release!43
parents b1bcbdf0 fbc63aa9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ As specified in the previous chapter, these variables are only used to generated
| `SEMREL_AUTO_RELEASE_ENABLED` | When set to `true` the job start automatically. When not set (default), the job is manual. | _none_ |
| `SEMREL_TAG_FORMAT`           | [tagFormat semantic-release option](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#tagformat). :warning: don't forget to double the `$` character so it is not interpreted by GitLab.                   | `$${version}` |
| `SEMREL_HOOKS_DIR`             | [Hook scripts](#hook_scripts) folder. | `.` |
| `SEMREL_COMMIT_MESSAGE`        | Add a custom commit message based on [semantic-release/git option](https://github.com/semantic-release/git#message). | _none_ (uses semantic-release default commit message) |
| `SEMREL_RELEASE_DISABLED`      | Disable this job. | _none_ |

#### Hook scripts
+5 −0
Original line number Diff line number Diff line
@@ -96,6 +96,11 @@
          "description": "Path to the GPG signkey exported with `gpg --armor --export-secret-key`.",
          "secret": true,
          "advanced": true
        },
        {
          "name": "SEMREL_COMMIT_MESSAGE",
          "description": "[message @semantic-release/git option](https://github.com/semantic-release/git#message)",
          "advanced": true
        }
      ]
    },
+11 −6
Original line number Diff line number Diff line
@@ -410,15 +410,20 @@ stages:
  function generate_git_plugin_conf() {
    # git plugin has default changelog file as asset by default so
    # we need to add it explicitly if the user configured a custom changelogFile
    if [[ "${SEMREL_CHANGELOG_ENABLED}" = "true" ]] && [[ -n "${SEMREL_CHANGELOG_FILE}" ]]; then
    echo "  - - '@semantic-release/git'"
    if [[ "${SEMREL_CHANGELOG_ENABLED}" = "true" ]] && [[ -n "${SEMREL_CHANGELOG_FILE}" ]]; then
      echo "    - assets:"
      echo "      - '${SEMREL_CHANGELOG_FILE}'"
      echo "      - 'package.json'"
      echo "      - 'package-lock.json'"
      echo "      - 'npm-shrinkwrap.json'"
      if [[ -n "${SEMREL_COMMIT_MESSAGE}" ]]; then
        echo "      message: \"${SEMREL_COMMIT_MESSAGE}\""
      fi
    else
      echo "  - '@semantic-release/git'"
      if [[ -n "${SEMREL_COMMIT_MESSAGE}" ]]; then
        echo "    - message: \"${SEMREL_COMMIT_MESSAGE}\""
      fi
    fi
  }