Skip to content

Commit f6d263f

Browse files
committed
better instructions
1 parent 3941ad0 commit f6d263f

3 files changed

Lines changed: 47 additions & 7 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bin/

README.md

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,53 @@ Type `fix I have fixed this` while you are on branch `me/ABC-123/important-fix`
1111
* And the ticket number in the branches is surrounded by slashes
1212
* When you execute the script with
1313
```
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
1515
```
1616
* Then we will run `git add -A` to add all files
1717
* And we will create a commit with message
1818
```
1919
changeType(ABC-123): rest of the message with spaces, even commas
2020
```
2121

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+
2241
## One-line usage from shell
2342

2443
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:
2544

2645
Set the following in your `~/.zshrc`:
2746

2847
```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"
3561
```
3662

3763
Now you can for example type `feat I have created a new feature` in your terminal and it will automatically invoke the script.

build.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Windows
2+
GOOS=windows GOARCH=386 go build -o bin/conventional-windows-386.exe ./...
3+
GOOS=windows GOARCH=amd64 go build -o bin/conventional-windows-amd64.exe ./...
4+
GOOS=windows GOARCH=arm go build -o bin/conventional-windows-arm.exe ./...
5+
GOOS=windows GOARCH=arm64 go build -o bin/conventional-windows-arm64.exe ./...
6+
7+
# MacOS
8+
GOOS=darwin GOARCH=amd64 go build -o bin/conventional-mac-amd64 ./...
9+
GOOS=darwin GOARCH=arm64 go build -o bin/conventional-mac-arm64 ./...
10+
11+
# Linux
12+
GOOS=linux GOARCH=amd64 go build -o bin/conventional-linux-amd64 ./...
13+
GOOS=linux GOARCH=arm go build -o bin/conventional-linux-arm ./...

0 commit comments

Comments
 (0)