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
The variable IMAGE_VERSION_PATCH should be the whole number (ex. 13) and not only the last digit (ex. 3)
Observed Behaviour
The variable $IMAGE_VERSION_PATCH contains only the last digit (ex.3)
Context
I was creating a script to automate my upgrade from overleaf version 3.0.1 to the latest (5.2.1).
While doing that i used shared-functions.sh to access it's functions and i needed to check the image version before upgrading to version 4.0.1 (needs image version > 3.5.10)
Technical Info
This is using the latest version of the toolkit
Operating System and version (desktop or mobile): Ubuntu server 20.04
Project and/or file: lib/shared-functions.sh
Analysis:
The problem is that the regex used in read_image_version is wrong.
Current regex: ^([0-9]+)\.([0-9]+)\.([0-9])+(-RC[0-9]*)?(-with-texlive-full)?$
Right regex: ^([0-9]+)\.([0-9]+)\.([0-9]+)+(-RC[0-9]*)?(-with-texlive-full)?$
The only difference is the + after the third number's regex.
You can test the regex only using websites like: https://regex101.com/
The text was updated successfully, but these errors were encountered:
Steps to Reproduce
read_image_version
fromlib/shared-functions.sh
$IMAGE_VERSION_PATCH
variableExample code : (the file must be in the toolkit root to work)
Expected Behaviour
The variable
IMAGE_VERSION_PATCH
should be the whole number (ex. 13) and not only the last digit (ex. 3)Observed Behaviour
The variable
$IMAGE_VERSION_PATCH
contains only the last digit (ex.3)Context
I was creating a script to automate my upgrade from overleaf version
3.0.1
to thelatest (5.2.1)
.While doing that i used shared-functions.sh to access it's functions and i needed to check the image version before upgrading to version 4.0.1 (needs image version > 3.5.10)
Technical Info
This is using the latest version of the toolkit
Analysis:
The problem is that the regex used in
read_image_version
is wrong.Current regex:
^([0-9]+)\.([0-9]+)\.([0-9])+(-RC[0-9]*)?(-with-texlive-full)?$
Right regex:
^([0-9]+)\.([0-9]+)\.([0-9]+)+(-RC[0-9]*)?(-with-texlive-full)?$
The only difference is the
+
after the third number's regex.You can test the regex only using websites like: https://regex101.com/
The text was updated successfully, but these errors were encountered: