You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 9, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 9, 2019. It is now read-only.
On a closer look the problem is in the line TAG=git tag -l | tail -n1 git tag -l prints:
v7.10-1
v7.2-1
v7.3-1
v7.3-2
v7.4-1
v7.4-2
v7.5-1
v7.5-2
v7.6-1
v7.7-1
v7.9-1
and now we don't want the last, but the first. quick fix is to use head in stead of tail, but it will break when v7.11 comes out...
isnt there a way to rename them?
probably but then you'll have to ask https://github.com/rraptorr. And I guess changing name on all previous git tags is a lot of work. Better to use a different way to get latest version. Since we know all new releases will be in 10,11..20 etc. we can just grep -v "v.7.0" and use tail from there.
I'd suggest
git tag -l | sort -h -k1.2 | tail -n1
instead. That should work as long as all tags have syntax "v" followed by a number. The "-h" is GNU specific and if that's a problem "-n" should result to similar order for these tag names.
I've not checked to see if this option is widely supported, but sort has a -V option which causes it to treat it's input as a list of Version numbers: ( http://linux.die.net/man/1/sort )
What is the reason to checkout the specific tag anyway? With the git clone a couple of lines earlier we already get the latest and that should be all we need, right?
from what I can tell, checking out a specific tag is intended to allow the script to be tailored to a specific JDK release. oracle is notorious for making their site VERY hard to scrape -- be it just crappy code or through actual intent.
checking out the latest tag as a basis for the script to do it's work, allows for the maintainer to commit into master without breaking proven/existing functionality -- ideally the latest tag version will continue to work, regardless of the status of master.
Activity
svein commentedon Dec 19, 2012
On a closer look the problem is in the line TAG=
git tag -l | tail -n1git tag -l prints:v7.10-1
v7.2-1
v7.3-1
v7.3-2
v7.4-1
v7.4-2
v7.5-1
v7.5-2
v7.6-1
v7.7-1
v7.9-1
and now we don't want the last, but the first. quick fix is to use head in stead of tail, but it will break when v7.11 comes out...
raziel23x commentedon Dec 19, 2012
isnt there a way to rename them?
v7.10-1
v7.02-1
v7.03-1
v7.03-2
v7.04-1
v7.04-2
v7.05-1
v7.05-2
v7.06-1
v7.07-1
v7.09-1
and this would fix?
svein commentedon Dec 19, 2012
hlawrenz commentedon Dec 19, 2012
I'm not sure if it's ideal, but you can change line 421 from:
TAG=
git tag -l | tail -n1to:
TAG=
git tag -l | sort -t . -k 2 -g | tail -n1mikkorantalainen commentedon Dec 20, 2012
I'd suggest
git tag -l | sort -h -k1.2 | tail -n1
instead. That should work as long as all tags have syntax "v" followed by a number. The "-h" is GNU specific and if that's a problem "-n" should result to similar order for these tag names.
mikkorantalainen commentedon Dec 20, 2012
In fact, I guess
sort -n -k1.2should be better choise in any case because there's no reason to expect names such as "v7.2k" to mean same as v7.2000".helterscelter commentedon Dec 21, 2012
I've not checked to see if this option is widely supported, but sort has a -V option which causes it to treat it's input as a list of Version numbers: ( http://linux.die.net/man/1/sort )
TAG=git tag -l | sort -V | tail -n1
seems to fix the issue for me
helterscelter commentedon Dec 21, 2012
I have opened a pull-request for the solution I propose above.
dakira commentedon Jan 6, 2013
What is the reason to checkout the specific tag anyway? With the git clone a couple of lines earlier we already get the latest and that should be all we need, right?
helterscelter commentedon Jan 8, 2013
from what I can tell, checking out a specific tag is intended to allow the script to be tailored to a specific JDK release. oracle is notorious for making their site VERY hard to scrape -- be it just crappy code or through actual intent.
checking out the latest tag as a basis for the script to do it's work, allows for the maintainer to commit into master without breaking proven/existing functionality -- ideally the latest tag version will continue to work, regardless of the status of master.