diff --git a/rules/rules_task/.releaserc b/rules/rules_task/.releaserc index f7f69bbd5..2589deb67 100644 --- a/rules/rules_task/.releaserc +++ b/rules/rules_task/.releaserc @@ -13,7 +13,6 @@ "releaseRules": [ { "type": "docs", - "scope": "readme.md", "release": "patch" }, { @@ -21,6 +20,18 @@ "release": "patch" } ], + "preset": "conventionalcommits" + } + ], + [ + "@semantic-release/exec", + { + "generateNotesCmd": "./generate-release-notes.sh ${nextRelease.version}" + } + ], + [ + "@semantic-release/release-notes-generator", + { "preset": "conventionalcommits", "presetConfig": { "types": [ @@ -76,13 +87,6 @@ } } ], - "@semantic-release/release-notes-generator", - [ - "@semantic-release/exec", - { - "prepareCmd": "./prepare-release.sh ${nextRelease.version}" - } - ], [ "@semantic-release/github", { diff --git a/rules/rules_task/generate-release-notes.sh b/rules/rules_task/generate-release-notes.sh new file mode 100755 index 000000000..49e869fcf --- /dev/null +++ b/rules/rules_task/generate-release-notes.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +set -Eeou pipefail + +export VERSION="v$1" + +export PREFIX="rules_task-$VERSION" +export ARCHIVE="rules_task-$VERSION.tar.gz" + +git archive --format=tar --prefix=${PREFIX}/ HEAD | gzip > $ARCHIVE + +export SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}') + +cat << EOF +## Using WORKSPACE: + +\`\`\`starlark + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +http_archive( + name = "rules_task", + sha256 = "${SHA}", + strip_prefix = "${PREFIX}", + url = "https://github.com/vgijssel/setup/releases/download/${PREFIX}/${ARCHIVE}", +) +EOF + +echo "\`\`\`" \ No newline at end of file diff --git a/rules/rules_task/prepare-release.sh b/rules/rules_task/prepare-release.sh deleted file mode 100755 index 6ff34d628..000000000 --- a/rules/rules_task/prepare-release.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -Eeou pipefail - -export VERSION=$1 - -export PREFIX="rules_task-$VERSION" -export ARCHIVE="rules_task-$VERSION.tar.gz" - -git archive --format=tar --prefix=${PREFIX}/ HEAD | gzip > $ARCHIVE \ No newline at end of file