Unverified Commit 6c074f67 authored by Timothy Stone's avatar Timothy Stone
Browse files

fix: add preset to semantic-release-info

Semantic Release Info is not commit spec aware.
parent b1c26cbb
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -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"