Skip to content

automate byte-buddy build #12

automate byte-buddy build

automate byte-buddy build #12

Workflow file for this run

name: "Byte Buddy Update"
on:
pull_request:
permissions:
pull-requests: write
contents: write
jobs:
pr-api-change:
name: PR Byte Buddy change
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8

Check failure on line 21 in .github/workflows/pr-bb-updates.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pr-bb-updates.yml

Invalid workflow file

You have an error in your yaml syntax on line 21
- name: Rebuild byte-buddy if version has changed
run: |
if [ 'byte-buddy-tag' = $(git diff --diff-filter=d --name-only origin/master -- 'byte-buddy-tag' agent/libs | xargs) ]
then
echo Byte Buddy tag was updated
tag=$(cat byte-buddy-tag)
# rm agent/libs/byte-buddy*
# git clone https://github.com/raphw/byte-buddy.git
# cp bb.patch byte-buddy
# cd byte-buddy
# git checkout $tag
# git apply bb.patch
# mvn clean package -Pextras -Dskiptests -q -B
# echo Build succeeded
# mv ./byte-buddy/target/$tag.jar ../agent/libs
# mv ./byte-buddy/target/$tag-sources.jar ../agent/libs
# cd ..
# rm -rf byte-buddy
# perl -pi -e "s|libs/byte-buddy-.+jar|libs/$tag.jar|" agent/build.gradle
echo updated byte buddy and reference
# git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
# echo set origin url to https://github.com/$GITHUB_REPOSITORY
git fetch
git checkout "${GITHUB_HEAD_REF}"
git add agent/libs agent/build.gradle
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git commit -m "rebuilt byte buddy"
git push
fi