mirror of
https://github.com/penpot/penpot.git
synced 2025-03-13 16:21:57 -05:00
✨ Improve version parsing.
This commit is contained in:
parent
ef25f8a721
commit
4e43bf5f78
1 changed files with 13 additions and 5 deletions
|
@ -23,10 +23,18 @@
|
|||
:commit nil}
|
||||
|
||||
(string? version)
|
||||
(let [[base build commit] (str/split version #"-" 3)]
|
||||
{:full version
|
||||
:base base
|
||||
:build (d/parse-integer build)
|
||||
:commit commit})
|
||||
(if (re-seq #"^[A-Za-z]+\-" version)
|
||||
(let [[branch base build commit] (str/split version #"-" 4)]
|
||||
{:full version
|
||||
:base base
|
||||
:build (d/parse-integer build)
|
||||
:branch branch
|
||||
:commit commit})
|
||||
(let [[base build commit] (str/split version #"-" 3)]
|
||||
{:full version
|
||||
:base base
|
||||
:build (d/parse-integer build)
|
||||
:branch nil
|
||||
:commit commit}))
|
||||
|
||||
:else nil))
|
||||
|
|
Loading…
Add table
Reference in a new issue