Skip to content

Commit d9d482a

Browse files
committed
[patch] 📝 Update docs
1 parent 5c6e87a commit d9d482a

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ $ git commit -m "[patch] increment patch version"
2929
## the commit comment contains "[patch]"
3030
3131
$ gitwerk semver-auto
32+
{:status :updated :old-version v0.0.1 :new-version v0.0.2}
3233
## increments tag to v0.0.2
3334
3435
###...
@@ -37,6 +38,7 @@ $ git commit -m "[tag.suffix=-alpha] [minor] increment minor version and add suf
3738
## the commit comment contains "[minor]" and "[tag.suffix=-alpha]"
3839
3940
$ gitwerk semver-auto
41+
{:status :updated :old-version v0.0.2 :new-version v0.1.0-alpha}
4042
## increments tag to v0.1.0-alpha
4143
4244
###...
@@ -45,6 +47,7 @@ $ git commit -m "[tag.prefix=] [tag.suffix=] [major] increment major version and
4547
## the commit comment contains "[major]", "[tag.prefix=]" and "[tag.suffix=]"
4648
4749
$ gitwerk semver-auto
50+
{:status :updated :old-version v0.1.0-alpha :new-version 1.0.0}
4851
## increments tag to 1.0.0
4952
5053
###...
@@ -53,6 +56,7 @@ $ git commit -m "[tag.prefix=v] just adding prefix"
5356
## the commit comment contains "[tag.prefix=v]"
5457
5558
$ gitwerk semver-auto
59+
{:status :updated :old-version 1.0.0 :new-version v1.0.0}
5660
## increments tag to v1.0.0
5761
```
5862

src/gitwerk/core.clj

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,27 @@
22
(:require
33
[clojure.spec.alpha :as spec]
44
[clojure.tools.cli :as cli]
5+
[clojure.string :as string]
56
[clojure.edn :as edn]
67
[clojure.java.io :as io]
78
[gitwerk.service.runner :as runner])
89
(:gen-class))
910

10-
(def cli-header "Usage: gitwerk [command] [options]")
11+
(def cli-header
12+
(string/join
13+
"\n"
14+
["gitwerk is a CLI tool for supporting Git(Hub) operations on CI."
15+
""
16+
"Usage: gitwerk [command] [options]"
17+
""
18+
"Available commands:"
19+
" clone [url] clone git repository"
20+
" log show git logs of current directory"
21+
" semver [type] print incremented version"
22+
" semver-auto increment version by latest git log message contexts"
23+
" tag show git tags of current directory"
24+
""
25+
"Options:"]))
1126
(def cli-options
1227
[["-f" "--file PATH" "config"
1328
:id :config-filename

0 commit comments

Comments
 (0)