From 247df52385901b5dfb111adf7662f83aa52ac97f Mon Sep 17 00:00:00 2001 From: Jonas Scharpf Date: Sat, 12 Oct 2024 16:20:24 +0200 Subject: [PATCH] found the bug --- .github/workflows/test-release.yaml | 14 ++++---------- snippets2changelog/collector.py | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-release.yaml b/.github/workflows/test-release.yaml index b2f73ad..8a581bf 100644 --- a/.github/workflows/test-release.yaml +++ b/.github/workflows/test-release.yaml @@ -35,19 +35,13 @@ jobs: changelog changelog.md \ --snippets=.snippets \ --dry-run > latest-entry.json - cat latest-entry.json - cat latest-entry.json | python -c "import sys, json; print(json.load(sys.stdin)['content'])" > latest_description.txt - - # jq -r ".content" latest-entry.json > latest_description.txt - # sed -i '/^$/d' latest_description.txt - # echo "CHANGELOG_JSON=$(jq -c . < latest-entry.json)" >> $GITHUB_ENV - + jq -r ".content" latest-entry.json > latest_description.txt + sed -i '/^$/d' latest_description.txt + echo "CHANGELOG_JSON=$(jq -c . < latest-entry.json)" >> $GITHUB_ENV echo 'LATEST_DESCRIPTION<<"EOT"' >> $GITHUB_OUTPUT cat latest_description.txt >> $GITHUB_OUTPUT echo '"EOT"' >> $GITHUB_OUTPUT - # echo "latest_version=$(jq -r '.version' latest-entry.json)" >> $GITHUB_ENV - - exit 128 + echo "latest_version=$(jq -r '.version' latest-entry.json)" >> $GITHUB_ENV - name: Update changelog with snippets run: | poetry run changelog-generator \ diff --git a/snippets2changelog/collector.py b/snippets2changelog/collector.py index e0e62d6..8084255 100644 --- a/snippets2changelog/collector.py +++ b/snippets2changelog/collector.py @@ -43,7 +43,7 @@ def branch_name(self) -> str: try: return str(self._repo.active_branch) except Exception as e: - print(f"HEAD is detached: {e}") + # print(f"HEAD is detached: {e}") return str(self._repo.head.commit.hexsha) @property