You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-7Lines changed: 33 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,27 +11,53 @@ Type `fix I have fixed this` while you are on branch `me/ABC-123/important-fix`
11
11
* And the ticket number in the branches is surrounded by slashes
12
12
* When you execute the script with
13
13
```
14
-
go run main.go [changeType] rest of the message with spaces, even commas
14
+
conventional [changeType] rest of the message with spaces, even commas
15
15
```
16
16
* Then we will run `git add -A` to add all files
17
17
* And we will create a commit with message
18
18
```
19
19
changeType(ABC-123): rest of the message with spaces, even commas
20
20
```
21
21
22
+
## Installation
23
+
24
+
### Install using golang
25
+
26
+
```sh
27
+
go install github.com/rickschubert/conventional-committer
28
+
# Execute the tool from anywhere in your terminal with conventional
29
+
conventional feat This is my first message
30
+
```
31
+
32
+
### Download from Releases
33
+
34
+
- Download the right file for your operating system from the [Releases page](https://github.com/rickschubert/conventional/releases)
35
+
- Invoke the script by pointing to the download:
36
+
37
+
```sh
38
+
/path/to/download/conventional feat This is my first message
39
+
```
40
+
22
41
## One-line usage from shell
23
42
24
43
If you want to be able to fire the script from anywhere in your terminal without invoking `go run` like so: `feat I just built a new feature`, then make sure to set an alias in your shell configuration:
25
44
26
45
Set the following in your `~/.zshrc`:
27
46
28
47
```sh
29
-
# Custom conventional commiter
30
-
alias fix="go run /path/to/conventional-committer/main.go fix"
31
-
alias feat="go run /path/to/conventional-committer/main.go feat"
32
-
alias chore="go run /path/to/conventional-committer/main.go chore"
33
-
alias docs="go run /path/to/conventional-committer/main.go docs"
34
-
alias tests="go run /path/to/conventional-committer/main.go test"
48
+
# If you installed it with go install:
49
+
alias fix="/path/to/conventional fix"
50
+
alias feat="/path/to/conventional feat"
51
+
alias chore="/path/to/conventional chore"
52
+
alias docs="/path/to/conventional docs"
53
+
alias tests="/path/to/conventional test"
54
+
55
+
# If you downloaded a release:
56
+
alias fix="conventional fix"
57
+
alias feat="conventional feat"
58
+
alias chore="conventional chore"
59
+
alias docs="conventional docs"
60
+
alias tests="conventional test"
35
61
```
36
62
37
63
Now you can for example type `feat I have created a new feature` in your terminal and it will automatically invoke the script.
0 commit comments