The exported version env var should have a consistent length
ClosedPublic

Authored by ahmadsamir on May 7 2018, 10:06 AM.

Details

Summary

Prepend a 0 to the VERSION_MICRO part of the KONSOLE_VERSION string
to make the env var length consistent, so that conditions that depend
on it actually work.

For example, the second version should be higher than the first one:

18.04.12 -> 180412
18.08.1  -> 180801

Diff Detail

Repository
R319 Konsole
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ahmadsamir created this revision.May 7 2018, 10:06 AM
Restricted Application added a project: Konsole. · View Herald TranscriptMay 7 2018, 10:06 AM
ahmadsamir requested review of this revision.May 7 2018, 10:06 AM
hindenburg added a comment.EditedMay 7 2018, 1:06 PM

Thanks for thinking of this. Would it be simplier to remove .; append '00' and then take left 6?

Thanks for thinking of this. Would it be simplier to remove .; append '00' and then take left 6?

"take left" as in left shift bitwise?

Would that work for 18.08.{1,2,3...}?

I was wondering if .remove(".").append("0").left(6) would be easier.

I was wondering if .remove(".").append("0").left(6) would be easier.

I see, (sorry I didn't make the connection earlier).

I tested that with a couple of cases, and it wouldn't work, for example:
18.08.1 -> 1808100 -> 180810
18.08.10 -> 18081000 -> 180810

18.08.2 -> 1808200 -> 180820
18.08.20 -> 18082000 -> 180820

and if KF5 ever breaks the double-number release versions, e.g. 100.08.2, :), then that bit of code would fail. I'd rather we make the code just work for all the cases we can think of now.

Ok sorry for the noise - I should have read this more closer

Ok sorry for the noise - I should have read this more closer

No problem. :)

hindenburg edited the summary of this revision. (Show Details)May 9 2018, 12:58 PM
Restricted Application added a subscriber: konsole-devel. · View Herald TranscriptMay 9 2018, 12:58 PM
hindenburg accepted this revision.May 9 2018, 1:11 PM
This revision is now accepted and ready to land.May 9 2018, 1:11 PM
This revision was automatically updated to reflect the committed changes.