remove manual main definitions

This commit is contained in:
2021-07-25 21:10:15 -06:00
parent b00e3d3c2e
commit 872b4861f8
7 changed files with 73 additions and 82 deletions

View File

@@ -1,16 +1,15 @@
(function :Void main []
(let [[jsonFile workingDir]
(Sys.args)
json
(Json.parse
(File.getContent (joinPath workingDir jsonFile)))
oldVersion
json.version
:kiss.List<Int> versionParts
(.map (oldVersion.split ".") Std.parseInt)]
(+= (nth versionParts -1) 1)
(let [newVersion
(versionParts.join ".")]
(print "Bumping version of $jsonFile from $oldVersion -> $newVersion")
(set json.version newVersion)
(File.saveContent (joinPath workingDir jsonFile) (Json.stringify json "\t")))))
(let [[jsonFile workingDir]
(Sys.args)
json
(Json.parse
(File.getContent (joinPath workingDir jsonFile)))
oldVersion
json.version
:kiss.List<Int> versionParts
(.map (oldVersion.split ".") Std.parseInt)]
(+= (nth versionParts -1) 1)
(let [newVersion
(versionParts.join ".")]
(print "Bumping version of $jsonFile from $oldVersion -> $newVersion")
(set json.version newVersion)
(File.saveContent (joinPath workingDir jsonFile) (Json.stringify json "\t"))))