-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create flow for automating byte-buddy version bump (#161)
* Squash workflow changes * rm workflow_dispatch trigger * better target_url
- Loading branch information
1 parent
5a8ba22
commit b30542a
Showing
4 changed files
with
151 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
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 | ||
- name: Rebuild byte-buddy if version has changed | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
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 -b update_byte_buddy-tag-$tag | ||
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 -f origin update_byte_buddy-tag-$tag | ||
gh pr create -B master -H update_byte_buddy-tag-$tag --fill && echo Update PR successfully made || echo PR is already open | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
diff --git a/byte-buddy-dep/pom.xml b/byte-buddy-dep/pom.xml | ||
index 3f8fa6217f..07ed398b33 100644 | ||
--- a/byte-buddy-dep/pom.xml | ||
+++ b/byte-buddy-dep/pom.xml | ||
@@ -48,10 +48,6 @@ | ||
<groupId>org.ow2.asm</groupId> | ||
<artifactId>asm-analysis</artifactId> | ||
</exclusion> | ||
- <exclusion> | ||
- <groupId>org.ow2.asm</groupId> | ||
- <artifactId>asm-tree</artifactId> | ||
- </exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
diff --git a/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/InstrumentedType.java b/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/InstrumentedType.java | ||
index 936a7c2b61..302c55e373 100644 | ||
--- a/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/InstrumentedType.java | ||
+++ b/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/InstrumentedType.java | ||
@@ -44,7 +44,8 @@ import static net.bytebuddy.matcher.ElementMatchers.is; | ||
import static net.bytebuddy.matcher.ElementMatchers.not; | ||
|
||
/** | ||
- * Implementations of this interface represent an instrumented type that is subject to change. Implementations | ||
+ * Implementations of this | ||
+ represent an instrumented type that is subject to change. Implementations | ||
* should however be immutable and return new instance when its builder methods are invoked. | ||
*/ | ||
public interface InstrumentedType extends TypeDescription { | ||
@@ -509,10 +510,10 @@ public interface InstrumentedType extends TypeDescription { | ||
* A set containing all keywords of the Java programming language. | ||
*/ | ||
private static final Set<String> KEYWORDS = new HashSet<String>(Arrays.asList( | ||
- "abstract", "continue", "for", "new", "switch", "assert", "default", "goto", "package", "synchronized", "boolean", | ||
+ "abstract", "continue", "for", "new", "switch", "assert", "goto", "package", "synchronized", "boolean", | ||
"do", "if", "private", "this", "break", "double", "implements", "protected", "throw", "byte", "else", "import", | ||
"public", "throws", "case", "enum", "instanceof", "return", "transient", "catch", "extends", "int", "short", | ||
- "try", "char", "final", "interface", "static", "void", "class", "finally", "long", "strictfp", "volatile", | ||
+ "try", "char", "final", "static", "void", "class", "finally", "long", "strictfp", "volatile", | ||
"const", "float", "native", "super", "while" | ||
)); | ||
|
||
diff --git a/byte-buddy/pom.xml b/byte-buddy/pom.xml | ||
index 35e8445b31..1c5bd75787 100644 | ||
--- a/byte-buddy/pom.xml | ||
+++ b/byte-buddy/pom.xml | ||
@@ -277,6 +277,7 @@ | ||
<exclude>**/NOTICE</exclude> | ||
</excludes> | ||
</filter> | ||
+ <!-- | ||
<filter> | ||
<artifact>org.ow2.asm:asm-commons</artifact> | ||
<includes> | ||
@@ -292,6 +293,7 @@ | ||
<include>org/objectweb/asm/commons/SimpleRemapper.**</include> | ||
</includes> | ||
</filter> | ||
+ --> | ||
</filters> | ||
<transformers> | ||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
byte-buddy-1.14.5 |