Skip to content

Commit

Permalink
ci: fixed failing github release job
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah0kello committed Aug 25, 2024
1 parent 4c5442c commit 983ce3c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,18 @@ jobs:
command: |
git fetch origin
git checkout origin/${CIRCLE_BRANCH}
- run:
<<: *defaults_export_version_from_package
- run:
name: Check the release changes
- run:
name: Format the changelog into the github release body and get release tag
command: |
echo "Changes are: ${RELEASE_CHANGES}"
source $(pwd)/.circleci/pipeline.sh
for dir in */; do
if [[ $dir == *-core-connector/ ]]; then
cd $dir
defaults_export_version_from_package
echo "Changes are: ${RELEASE_CHANGES}"
cd -
fi
done
- run:
name: Create Release
command: |
Expand Down
7 changes: 7 additions & 0 deletions .circleci/pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,11 @@ defaults_configure_git() {
git config user.name "$GIT_CI_USER"
}

defaults_export_version_from_package() {
git diff --no-indent-heuristic main~1 HEAD CHANGELOG.md | sed -n '/^+[^+]/ s/^+//p' > /tmp/changes
echo 'export RELEASE_CHANGES=$(cat /tmp/changes)' >> "$BASH_ENV"
echo 'export RELEASE_TAG=$(jq -r .version < package-lock.json)' >> "$BASH_ENV"
}



0 comments on commit 983ce3c

Please sign in to comment.