From 6c074f671b3e48480f8aea04f71df00f93d54fc0 Mon Sep 17 00:00:00 2001 From: Timothy Stone <gitlab@petmystone.com> Date: Mon, 11 Nov 2024 14:37:35 -0500 Subject: [PATCH] fix: add preset to semantic-release-info Semantic Release Info is not commit spec aware. --- templates/gitlab-ci-semrel.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/templates/gitlab-ci-semrel.yml b/templates/gitlab-ci-semrel.yml index b88d0e8..5a9a580 100644 --- a/templates/gitlab-ci-semrel.yml +++ b/templates/gitlab-ci-semrel.yml @@ -695,7 +695,7 @@ stages: # Generating the hook scripts that will generate the dotenv file # The dotenv file is generated in $TMPDIR so it will survive the git reset dotenv_tmp="$(mktemp -t semrel-info-XXXXXXXXXX.dotenv)" - + commitPresetConfig=$(generate_commit_preset_conf) export_last_version_hook_script="./export-last-version.sh" { echo "#!/bin/bash" @@ -727,16 +727,13 @@ stages: echo "" echo "# injected (replace your plugins) plugins by the template to generate dotenv" echo "" - echo "plugins: [" - echo " \"@semantic-release/commit-analyzer\"," - echo " [" - echo " \"@semantic-release/exec\"," - echo " {" - echo " \"analyzeCommitsCmd\": \"${export_last_version_hook_script} \\\"\${lastRelease.version}\\\"\"", - echo " \"verifyReleaseCmd\": \"${export_next_version_hook_script} \\\"\${nextRelease.version}\\\" \\\"\${nextRelease.type}\\\"\"" - echo " }" - echo " ]," - echo "]" + echo "plugins:" + echo " - - '@semantic-release/commit-analyzer'" + echo "${commitPresetConfig}" + echo " - - '@semantic-release/exec'" + echo " - analyzeCommitsCmd: '\"${export_last_version_hook_script}\" \"\${lastRelease.version}\"'" + echo " verifyReleaseCmd: '\"${export_next_version_hook_script}\" \"\${nextRelease.version}\" \"\${nextRelease.type}\"'" + echo "" } >> "${releaserc_file}.new" mv -f "${releaserc_file}.new" ".releaserc" -- GitLab