File tree Expand file tree Collapse file tree 2 files changed +4
-16
lines changed
src/main/java/one/profiler Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,8 @@ def get_release(release: str) -> Dict[str, Any]:
73
73
74
74
75
75
def get_release_versions () -> List [str ]:
76
- return [release ["tag_name" ][1 :] for release in get_releases () if not release ["tag_name" ][1 :].startswith ("1." )]
76
+ return [release ["tag_name" ][1 :] for release in get_releases () if not release ["tag_name" ][1 :].startswith ("1." )
77
+ and release ["tag_name" ][- 1 ].isdigit ()]
77
78
78
79
79
80
def get_most_recent_release () -> str :
Original file line number Diff line number Diff line change @@ -139,12 +139,10 @@ private static String getLibrarySuffix() {
139
139
if (arch .equals ("arm64" ) || arch .equals ("aarch64" )) {
140
140
librarySuffix = version + "-linux-aarch64.so" ;
141
141
} else if (arch .equals ("x86_64" ) || arch .equals ("x64" ) || arch .equals ("amd64" )) {
142
- if (isOnGLibc ()) {
143
- librarySuffix = version + "-linux-x64.so" ;
144
- } else if (isOnMusl ()) {
142
+ if (isOnMusl ()) {
145
143
librarySuffix = version + "-linux-x64-musl.so" ;
146
144
} else {
147
- throw new IllegalStateException ( "Async-profiler does not work with the given libc" ) ;
145
+ librarySuffix = version + "-linux-x64.so" ;
148
146
}
149
147
} else {
150
148
throw new IllegalStateException ("Async-profiler does not work on Linux " + arch );
@@ -201,17 +199,6 @@ public static String getVersion() {
201
199
return version ;
202
200
}
203
201
204
- private static boolean isOnGLibc () {
205
- // see https://unix.stackexchange.com/questions/120380/what-c-library-version-does-my-system-use
206
- try {
207
- Process process = Runtime .getRuntime ().exec (new String [] {"getconf" , "GNU_LIBC_VERSION" });
208
- BufferedReader reader = new BufferedReader (new InputStreamReader (process .getInputStream ()));
209
- return reader .readLine () != null ;
210
- } catch (IOException e ) {
211
- return false ;
212
- }
213
- }
214
-
215
202
private static boolean isOnMusl () {
216
203
// based on https://docs.pleroma.social/backend/installation/otp_en/#detecting-flavour
217
204
try {
You can’t perform that action at this time.
0 commit comments