Skip to content

Commit 01f08cc

Browse files
authored
[REL-4161] debugging changelog (#528)
debugging the changelog issues <!-- ld-jira-link --> --- Related Jira issue: [REL-4161: Migrate ld-find-code-refs from Releaser to GHA](https://launchdarkly.atlassian.net/browse/REL-4161) <!-- end-ld-jira-link -->
1 parent addb680 commit 01f08cc

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ jobs:
2525
env:
2626
LD_RELEASE_VERSION: ${{ inputs.releaseVersion }}
2727
DRY_RUN: ${{ inputs.dryRun || 'false' }}
28-
CHANGELOG_ENTRY: ${{ toJSON(inputs.changeLog) }}
28+
CHANGELOG_ENTRY: ${{ inputs.changeLog }}
29+
CHANGELOG_JSON: ${{ toJSON(inputs.changeLog) }}
2930
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3031
ARTIFACT_DIRECTORY: "/tmp/release-artifacts"
3132
steps:

scripts/release/commit-and-tag.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,23 @@ tag_exists() (
1111

1212
update_changelog() (
1313
local ts=$(date +"%Y-%m-%d")
14+
15+
echo "raw changelog"
16+
echo "$CHANGELOG_ENTRY"
17+
18+
echo "json changelog"
19+
echo "$CHANGELOG_JSON"
20+
21+
local changelog_body=$(echo "$CHANGELOG_ENTRY" | sed "s/\\n/\n/g")
1422
local changelog_json=$(echo "$CHANGELOG_ENTRY" | jq -r .)
15-
local changelog_entry=$(printf "## [%s] - %s\n%s\n" "$LD_RELEASE_VERSION" "$ts" "$changelog_json")
23+
24+
echo "parsed with sed"
25+
echo "$changelog_body"
26+
27+
echo "parsed with jq"
28+
echo "$changelog_json"
29+
30+
local changelog_entry=$(printf "## [%s] - %s\n%s\n" "$LD_RELEASE_VERSION" "$ts" "$changelog_body")
1631

1732
# insert the new changelog entry (followed by empty line) after line 4
1833
# of CHANGELOG.md

0 commit comments

Comments
 (0)