mirror of
https://github.com/penpot/penpot.git
synced 2025-04-13 07:21:40 -05:00
✨ Only create snapshot if file is modified (on srepl helper)
This commit is contained in:
parent
541ed6282f
commit
4c1312d4f6
1 changed files with 3 additions and 4 deletions
|
@ -123,10 +123,6 @@
|
|||
|
||||
(defn process-file!
|
||||
[system file-id update-fn & {:keys [label validate? with-libraries?] :or {validate? true} :as opts}]
|
||||
|
||||
(when (string? label)
|
||||
(fsnap/create-file-snapshot! system nil file-id label))
|
||||
|
||||
(let [conn (db/get-connection system)
|
||||
file (get-file system file-id)
|
||||
libs (when with-libraries?
|
||||
|
@ -144,6 +140,9 @@
|
|||
(when validate?
|
||||
(cfv/validate-file-schema! file'))
|
||||
|
||||
(when (string? label)
|
||||
(fsnap/create-file-snapshot! system nil file-id label))
|
||||
|
||||
(let [file' (update file' :revn inc)]
|
||||
(update-file! system file')
|
||||
true))))
|
||||
|
|
Loading…
Add table
Reference in a new issue