Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
Release version 3.0.6 (PR #82)
Browse files Browse the repository at this point in the history
Release version 3.0.6
  • Loading branch information
tofi86 authored Mar 19, 2020
2 parents 782c910 + a749fbb commit 58e012e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
ChangeLog
---------

### v3.0.6 (2020-03-19)
* Fixed an issue related to Java 4-8 version number detection (PR #81, Thanks to @thatChadM for his contribution)

### v3.0.5 (2019-12-15)
* If java is missing, offer a choice between Oracle and AdoptOpenJDK download buttons (#78)
* Support Array style `Java:Arguments` for Apple Plist style (#76)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-2018 Tobias Fischer
Copyright (c) 2014-2020 Tobias Fischer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 4 additions & 4 deletions src/universalJavaApplicationStub
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
# #
# @author Tobias Fischer #
# @url https://github.com/tofi86/universalJavaApplicationStub #
# @date 2019-12-15 #
# @version 3.0.5 #
# @date 2020-03-19 #
# @version 3.0.6 #
# #
##################################################################################
# #
# The MIT License (MIT) #
# #
# Copyright (c) 2014-2018 Tobias Fischer #
# Copyright (c) 2014-2020 Tobias Fischer #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
Expand Down Expand Up @@ -477,7 +477,7 @@ function get_comparable_java_version() {
################################################################################
function is_valid_requirement_pattern() {
local java_req=$1
java8pattern='1\.[4-8](\.0)?(\.0_[0-9]+)?[*+]?'
java8pattern='1\.[4-8](\.[0-9]+)?(\.0_[0-9]+)?[*+]?'
java9pattern='(9|1[0-9])(-ea|[*+]|(\.[0-9]+){1,2}[*+]?)?'
# test matches either old Java versioning scheme (up to 1.8) or new scheme (starting with 9)
if [[ ${java_req} =~ ^(${java8pattern}|${java9pattern})$ ]]; then
Expand Down
6 changes: 4 additions & 2 deletions test/java-version-tester.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Tests for the functions used in universalJavaApplicationStub script
# tofi86 @ 2018-07-29
# tofi86 @ 2020-02-11



Expand Down Expand Up @@ -84,7 +84,7 @@ function get_comparable_java_version() {
################################################################################
function is_valid_requirement_pattern() {
local java_req=$1
java8pattern='1\.[4-8](\.0)?(\.0_[0-9]+)?[*+]?'
java8pattern='1\.[4-8](\.[0-9]+)?(\.0_[0-9]+)?[*+]?'
java9pattern='(9|1[0-9])(-ea|[*+]|(\.[0-9]+){1,2}[*+]?)?'
# test matches either old Java versioning scheme (up to 1.8) or new scheme (starting with 9)
if [[ ${java_req} =~ ^(${java8pattern}|${java9pattern})$ ]]; then
Expand Down Expand Up @@ -179,6 +179,7 @@ echo "Tests with Java 1.6:"
testExtractMajor "1.6" "6"
testExtractMajor "1.6+" "6"
testExtractMajor "1.6.0" "6"
testExtractMajor "1.6.2" "6"
testExtractMajor "1.6.0_07" "6"
testExtractMajor "1.6.0_45" "6"
testExtractMajor "1.6.0_65-b14-468" "6"
Expand Down Expand Up @@ -328,6 +329,7 @@ testValidReqPattern "1.6.0_45" "0"
testValidReqPattern "1.6.0_45+" "0"
testValidReqPattern "1.6.0_100" "0"
testValidReqPattern "1.6.0_100+" "0"
testValidReqPattern "1.6.2" "0"
echo ""
echo "Tests with old version scheme (invalid requirements):"
testValidReqPattern "1.2" "1"
Expand Down

0 comments on commit 58e012e

Please sign in to comment.