Manually resolve merge conficts

This commit is contained in:
MinchinWeb 2021-05-09 14:02:36 -06:00
commit c8ca3a0358
12 changed files with 190 additions and 146 deletions

View file

@ -85,6 +85,13 @@ jobs:
exit 1
fi
if [[ $tagline == 1 ]]; then
echo "::error::Something is wrong."
echo "::error::The latest release ${SINCE_TAG} is the first line in the changelog,"
echo "::error::but the h1 '# Changelog' should always be the first line."
exit 1
fi
sed -i "1,$(expr $tagline - 1)d" "$FILENAME"
# delete generated line (or it will be added multiple times)
sed -i '/This Changelog was automatically generated by/d' "$FILENAME"
@ -124,6 +131,7 @@ jobs:
git diff
if [[ $(grep -c '^# Changelog$' "$FILENAME") != 1 ]]; then
echo '::error::Something is wrong with the changelog.'
exit 1
fi
SOMETHING_CHANGED=false
git diff --exit-code || SOMETHING_CHANGED=true
@ -142,6 +150,7 @@ jobs:
- name: Merge to Release branch
if: env.FULL_RELEASE == 'true'
run: |
git fetch --unshallow origin
git checkout release
git merge --ff-only $BRANCH
git push origin release

View file

@ -127,7 +127,7 @@ jobs:
echo "JRNL_VERSION=$JRNL_VERSION" >> $GITHUB_ENV
echo "PYPI_VERSION=$PYPI_VERSION" >> $GITHUB_ENV
- name: Determine type of release
- name: Set env variables
env:
REPO_OWNER: ${{ github.repository_owner }}
run: |
@ -156,26 +156,7 @@ jobs:
run: |
brew tap ${FORMULA_REPO}
echo '::debug::Set tap directory'
echo "BREW_TAP_DIRECTORY='$(brew --repository)/Library/Taps/${FORMULA_REPO}'" >> $GITHUB_ENV
- name: Config git user
working-directory: ${{ env.BREW_TAP_DIRECTORY }}
run: |
git config --local user.name "${{ secrets.JRNL_BOT_NAME }}"
git config --local user.email "${{ secrets.JRNL_BOT_EMAIL }}"
- name: Create branch
working-directory: ${{ env.BREW_TAP_DIRECTORY }}
run: |
BRANCH_NAME="jrnl-${JRNL_VERSION}--${RANDOM}"
git remote rename origin upstream
git remote add origin "https://${{ secrets.JRNL_BOT_NAME }}:${{ secrets.JRNL_BOT_TOKEN }}@github.com/${BOT_REPO}.git"
git fetch upstream
git fetch origin
git checkout -b $BRANCH_NAME
git push -u origin $BRANCH_NAME
echo "BREW_TAP_DIRECTORY=$(brew --repo ${FORMULA_REPO})" >> $GITHUB_ENV
- name: Install dependencies
run: brew install pipgrip
@ -207,32 +188,28 @@ jobs:
brew bump-formula-pr "${FORMULA_NAME}"
--url $(jq ".releases[\"${PYPI_VERSION}\"][1].url" -r api_response.json)
--sha256 $(jq ".releases[\"${PYPI_VERSION}\"][1].digests.sha256" -r api_response.json)
--version=$PYPI_VERSION
--no-audit
--write
--commit
--force
--verbose
- name: Update commit message
working-directory: ${{ env.BREW_TAP_DIRECTORY }}
run: |
git commit --amend \
-m "jrnl ${JRNL_VERSION}" \
-m "Update jrnl to ${JRNL_VERSION}" \
-m '${{ secrets.RELEASE_COAUTHORS }}'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
path: ${{ env.BREW_TAP_DIRECTORY }}
token: ${{ secrets.JRNL_BOT_TOKEN }}
push-to-fork: ${{ env.BOT_REPO }}
- name: Push commit
working-directory: ${{ env.BREW_TAP_DIRECTORY }}
run: |
git show head
git push
committer: ${{ secrets.JRNL_BOT_NAME }} <${{ secrets.JRNL_BOT_EMAIL }}>
author: ${{ secrets.JRNL_BOT_NAME }} <${{ secrets.JRNL_BOT_EMAIL }}>
- name: Open pull request
working-directory: ${{ env.BREW_TAP_DIRECTORY }}
env:
GH_TOKEN: ${{ secrets.JRNL_BOT_TOKEN }}
run: >
gh pr create
--title "jrnl ${JRNL_VERSION}"
--body 'Created with `brew bump-formula-pr`.'
title: jrnl ${{ env.JRNL_VERSION }}
body: Created with `brew bump-formula-pr`
branch: jrnl-${{ env.JRNL_VERSION }}--
branch-suffix: random
commit-message: |
jrnl ${{ env.JRNL_VERSION }}
Update jrnl to ${{ env.JRNL_VERSION }}
${{ secrets.RELEASE_COAUTHORS }}