The previous logic failed on 2.0 to make the new version number 1.99.99. This is fixed now even though the code is not perfect or good at all but should work well enough for its purposes. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3594
-- Commit Summary --
* CI: Fix version parsing and calculating for 2.0
-- File Changes --
M scripts/ci_mingw64_geany.sh (14)
-- Patch Links --
https://github.com/geany/geany/pull/3594.patch https://github.com/geany/geany/pull/3594.diff
JFYI, it's even tested this time (left is the result, right is the input version): ``` 1.38.0 - 1.38.1_git_20231011113518_173744b2b 1.37.99 - 1.38_git_20231011113518_173744b2b 2.0.0 - 2.0.1 1.99.99 - 2.0_git_20231011113518_173744b2b 2.1.89 - 2.1.90 2.0.99 - 2.1 2.2.0 - 2.2.1 2.89.99 - 2.90 ```
@b4n commented on this pull request.
if [ -z "${PATCH}" ] || [ "${PATCH}" = "0" ]; then
- MINOR="$((MINOR-1))" - PATCH="90" + if [[ "${MINOR}" = "0" && (-z "${PATCH}" || "${PATCH}" = "0") ]]; then + MAJOR="$((MAJOR-1))" + MINOR="99" + PATCH="99" else - PATCH="$((PATCH-1))" + if [[ -z "${PATCH}" || "${PATCH}" = "0" ]]; then + MINOR="$((MINOR-1))" + PATCH="99" + else + PATCH="$((PATCH-1))" + fi fi
Isn't this a simpler version of the exact same thing? ```bash
if [ -z "${PATCH}" ] || [ "${PATCH}" = "0" ]; then if [ "${MINOR}" = "0" ]; then MAJOR="$((MAJOR-1))" MINOR="99" else MINOR="$((MINOR-1))" fi PATCH="99" else PATCH="$((PATCH-1))" fi ```
@eht16 pushed 1 commit.
15ef1d536971a3c3be9eb0d6b4cd2363ab21fb08 Use b4n's simpler version
@eht16 commented on this pull request.
if [ -z "${PATCH}" ] || [ "${PATCH}" = "0" ]; then
- MINOR="$((MINOR-1))" - PATCH="90" + if [[ "${MINOR}" = "0" && (-z "${PATCH}" || "${PATCH}" = "0") ]]; then + MAJOR="$((MAJOR-1))" + MINOR="99" + PATCH="99" else - PATCH="$((PATCH-1))" + if [[ -z "${PATCH}" || "${PATCH}" = "0" ]]; then + MINOR="$((MINOR-1))" + PATCH="99" + else + PATCH="$((PATCH-1))" + fi fi
Sweet, thank you.
@b4n approved this pull request.
LGTM, but you could squash the second commit into the first :wink:
Merged #3594 into master.
Didn't you like the second commit's message? :D
Done and thanks for review.
github-comments@lists.geany.org