From 3d83674b6fba21573f09f1d06601839c6738e366 Mon Sep 17 00:00:00 2001 From: Frank Zhu Date: Wed, 8 May 2024 14:25:14 -0500 Subject: [PATCH 1/5] fix: changesets release preview --- .github/workflows/changesets-preview-pr.yml | 1 + tools/ci/format_changelog | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/changesets-preview-pr.yml b/.github/workflows/changesets-preview-pr.yml index 03d1fecf618..2f782051e52 100644 --- a/.github/workflows/changesets-preview-pr.yml +++ b/.github/workflows/changesets-preview-pr.yml @@ -7,6 +7,7 @@ name: Release Preview - Changeset on: push: branches: + - fix/changesets-release-preview - develop jobs: diff --git a/tools/ci/format_changelog b/tools/ci/format_changelog index 7e508a1e129..93b7829626a 100755 --- a/tools/ci/format_changelog +++ b/tools/ci/format_changelog @@ -35,7 +35,7 @@ append_changelog_content() { continue fi changesets=$(jq -r --arg key "$tag" '.[$key] | join("\n\n")' tags.json) - read -d '' changelog_content < Date: Wed, 8 May 2024 14:26:09 -0500 Subject: [PATCH 2/5] test changeset file --- .changeset/good-kiwis-cross.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/good-kiwis-cross.md diff --git a/.changeset/good-kiwis-cross.md b/.changeset/good-kiwis-cross.md new file mode 100644 index 00000000000..510bacdc42a --- /dev/null +++ b/.changeset/good-kiwis-cross.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Test - remove after From 1aab2808919005fb0a723cc23ad22e3bf2685c22 Mon Sep 17 00:00:00 2001 From: Frank Zhu Date: Wed, 8 May 2024 14:43:22 -0500 Subject: [PATCH 3/5] fix --- tools/ci/format_changelog | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tools/ci/format_changelog b/tools/ci/format_changelog index 93b7829626a..8d2e32210f1 100755 --- a/tools/ci/format_changelog +++ b/tools/ci/format_changelog @@ -1,5 +1,14 @@ #!/usr/bin/env bash +# This script will generate the next release using changeset. +# However, since changeset has its own semvar versioning system +# and we have our custom tags, this script rewrites the CHANGELOG.md +# with each tag as its header and group respective changeset that has +# the tag under it. +# +# The workflow is here: +# https://github.com/smartcontractkit/chainlink/actions/workflows/changesets-preview-pr.yml + set -euo pipefail if [[ -z "${GITHUB_OUTPUT:-}" ]]; then @@ -107,6 +116,7 @@ cleanup() { rm -f CHANGELOG.md.tmp rm -f changesets.json rm -f tags.json + rm test } ### SCRIPT STARTS HERE ### @@ -118,7 +128,7 @@ pnpm changeset version version=$(jq -r '.version' package.json) echo "version=$version" >> $GITHUB_OUTPUT -read -d '' changelog_content < Date: Wed, 8 May 2024 14:44:58 -0500 Subject: [PATCH 4/5] fix --- tools/ci/format_changelog | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/ci/format_changelog b/tools/ci/format_changelog index 8d2e32210f1..c83948a1d47 100755 --- a/tools/ci/format_changelog +++ b/tools/ci/format_changelog @@ -116,7 +116,6 @@ cleanup() { rm -f CHANGELOG.md.tmp rm -f changesets.json rm -f tags.json - rm test } ### SCRIPT STARTS HERE ### From 37d0397b94c6fc905d16f4a4e0a1b3395d2ef704 Mon Sep 17 00:00:00 2001 From: Frank Zhu Date: Wed, 8 May 2024 14:50:04 -0500 Subject: [PATCH 5/5] remove test stuff --- .changeset/good-kiwis-cross.md | 5 ----- .github/workflows/changesets-preview-pr.yml | 1 - 2 files changed, 6 deletions(-) delete mode 100644 .changeset/good-kiwis-cross.md diff --git a/.changeset/good-kiwis-cross.md b/.changeset/good-kiwis-cross.md deleted file mode 100644 index 510bacdc42a..00000000000 --- a/.changeset/good-kiwis-cross.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -Test - remove after diff --git a/.github/workflows/changesets-preview-pr.yml b/.github/workflows/changesets-preview-pr.yml index 2f782051e52..03d1fecf618 100644 --- a/.github/workflows/changesets-preview-pr.yml +++ b/.github/workflows/changesets-preview-pr.yml @@ -7,7 +7,6 @@ name: Release Preview - Changeset on: push: branches: - - fix/changesets-release-preview - develop jobs: