-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a quickfix until #21 is resolved. When an arch is not present in the regular expression, the arch modifier is interpreted as part of the version string, resulting in bogus behavior.
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -439,7 +439,7 @@ private static boolean isIJ1Plugin(final File file) { | |
|
||
private final static Pattern versionPattern = Pattern.compile("(.+?)" | ||
+ "(-\\d+(\\.\\d+|\\d{7})+[a-z]?\\d?(-[A-Za-z0-9.]+?|\\.GA)*?)?" | ||
+ "((-(swing|swt|sources|javadoc|native|linux-x86|linux-x86_64|macosx-x86_64|windows-x86|windows-x86_64|android-arm|android-x86|natives-windows|natives-macos|natives-linux))?(\\.jar(-[a-z]*)?))"); | ||
+ "((-(swing|swt|sources|javadoc|native|linux-x86|linux-x86_64|linux-armhf|linux-ppc64le|macosx-x86_64|windows-x86|windows-x86_64|android-x86|android-x86_64|android-arm|android-arm64|ios-x86_64|ios-arm64|natives-windows|natives-macos|natives-linux))?(\\.jar(-[a-z]*)?))"); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ctrueden
Member
|
||
private final static int PREFIX_INDEX = 1; | ||
private final static int VERSION_INDEX = 2; | ||
private final static int SUFFIX_INDEX = 5; | ||
|
Instead of hardcoding all these archs, how about using
linux-\\w*
instead? Andandroid-[0-9a-zA-Z_-]*
,windows-[0-9a-zA-Z_-]*
,macosx-[0-9a-zA-Z_-]*
. Then we won't have to keep expanding it.