File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 77 [gitwerk.service.semver-auto :as semver-auto]))
88
99(defn semver-auto
10- [repodir]
10+ [repodir dry-run? ]
1111 (let [repo (git/repo repodir)
1212 message (-> repo
1313 (git/latest-log )
1717 (semver/latest-tag ))
1818 (semver/default-version-str ))
1919 new-tag (semver-auto/semver-auto message tag)]
20- (when (not (= tag new-tag))
21- (git/tag repo new-tag)
20+ (when-not (= tag new-tag)
21+ (when-not dry-run?
22+ (git/tag repo new-tag))
2223 {:old tag
2324 :new new-tag})))
2425
25- (defn run [ctx _]
26- (let [res (semver-auto " ." )]
26+ (defn run [{:keys [options] :as ctx} _]
27+ (let [{:keys [dry-run?]} options
28+ res (semver-auto " ." dry-run?)]
2729 (if res
2830 {:status 0
2931 :console-out
Original file line number Diff line number Diff line change 2828 [[" -f" " --file PATH" " config"
2929 :id :config-filename
3030 :default " config.edn" ]
31+ [nil " --dry-run" :id :dry-run? ]
3132 [" -e" " --edn" :id :edn? ]
3233 [" -d" " --debug" :id :debug? ]
3334 [" -h" " --help" :id :help? ]])
You can’t perform that action at this time.
0 commit comments