Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Autoversion" external links to prevent a 404? #57

Open
t-book opened this issue Oct 11, 2020 · 2 comments
Open

"Autoversion" external links to prevent a 404? #57

t-book opened this issue Oct 11, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@t-book
Copy link
Collaborator

t-book commented Oct 11, 2020

Some of our external links get outdated quite fast and hence will end in a 404. As an example

sudo wget http://www-us.apache.org/dist/tomcat/tomcat-8/v8.5.58/bin/apache-tomcat-8.5.58.tar.gz https://docs.geonode.org/en/master/install/advanced/core/index.html?highlight=tomcat#install-geoserver

(minor version changes)

I wonder if it would makes sense to whenever there is some directory listing with a reliable versioning to first retrieve the highest version number to use with wget.

TOMCAT_VERSION=$(wget https://downloads.apache.org/tomcat/tomcat-8 -q -O - | grep -Eo "[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}" | tail -1)
wget http://www-us.apache.org/dist/tomcat/tomcat-8/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz

While this will prevent a 404, the use of a regex might not be easy to understand for new users … What do you think?

@t-book t-book added the enhancement New feature or request label Oct 11, 2020
@t-book t-book self-assigned this Oct 11, 2020
@t-book
Copy link
Collaborator Author

t-book commented Oct 14, 2020

ping @gannebamm

@gannebamm
Copy link
Collaborator

Is this still relevant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants