#1 2022-04-15 12:38:55

PBa
Member
From: Austria
Registered: 2017-01-04
Posts: 18

mORMot 2 commit build number reset to 2.0.1

Dear ab,

with commit 5d53eb7c91ee894dc6a3faf3ce4b425a18e0d238 dated April 14th the build number of mormot.commit.inc has been reset from 2.0.200 to 2.0.1 instead of 2.0.201.

Has this been done intentionally?

Best regards and have a good Easter weekend!

Paul

Offline

#2 2022-04-16 08:59:59

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: mORMot 2 commit build number reset to 2.0.1

You are right: it was probably a mistake from my part, when preparing the commit.

Should be fixed now by https://github.com/synopse/mORMot2/commit/dbd90aba

Offline

#3 2022-04-19 11:48:35

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 430

Re: mORMot 2 commit build number reset to 2.0.1

Happened again

Offline

#4 2022-04-19 12:23:05

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: mORMot 2 commit build number reset to 2.0.1

So it sounds like a bug in the bash interpreter, I am afraid...
https://github.com/synopse/mORMot2/blob … /commit.sh

I confirm there is a bug in our script:

abouchez@tisab:~/dev/github/mORMot2$ ./commit.sh 
VERS=199'
V2=199
committed 2.0.200 as https://github.com/synopse/mORMot2/commit/2e19dfcd
abouchez@tisab:~/dev/github/mORMot2$ ./commit.sh 
VERS=
./commit.sh: line 5: -2: substring expression < 0

I don't get why '2.0.200' is not parsed properly, whereas '2.0.199' is - the last '0' char is making an issue with sed... sad

Has anyone any clue?

Offline

#5 2022-04-19 13:43:56

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: mORMot 2 commit build number reset to 2.0.1

Update:
I have replaced the bash evaluation by a two lines python sub function.
See https://github.com/synopse/mORMot2/commit/40dd0526

Sounds safer now.
Bash is just a brain eater...

Offline

#6 2022-04-20 05:43:26

pvn0
Member
From: Slovenia
Registered: 2018-02-12
Posts: 211

Re: mORMot 2 commit build number reset to 2.0.1

I found it way easier to just write little pascal programs in fpc then trying to understand some bash, awk, seed or regex crap ...
You can execute external programs with little effort using TProcess, https://wiki.freepascal.org/Executing_E … s#TProcess.
I haven't had any problems so far using this method.

Last edited by pvn0 (2022-04-20 05:47:01)

Offline

#7 2022-04-20 07:47:15

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: mORMot 2 commit build number reset to 2.0.1

Bash was a native solution: I wanted at least to try and learn...

What I learn is that I should stay away from bash, because I don't know enough of it for sure. wink
Writing the Python lines was fun, on the contrary. Object orientation made it easy to find how to write what I wanted to achieve.

Offline

Board footer

Powered by FluxBB