Skip to content

Commit

Permalink
fix(devtools): get go build working with nix
Browse files Browse the repository at this point in the history
  • Loading branch information
SKalt committed Nov 4, 2022
1 parent 3244521 commit 71cc1dd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#!/usr/bin/env sh
unset GOPATH GOROOT
use flake
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: build install release changelog
.PHONY: build install release changelog test-release-process test-rpm-install
./dist/git-cc: ./main.go ./go.mod ./go.sum ./pkg/**/*.go
go build -o ./dist
build: ./dist/git-cc
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# git-cc

a git extension to help write [conventional commits][cc-standard]

![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/skalt/git-cc)
![Go report card](https://goreportcard.com/badge/github.com/skalt/git-cc)


## Usage

![demo video](./assets/demo.gif)
Expand All @@ -22,16 +22,18 @@ git cc 'feat(cli): added a conventional commit' # ok! creates a commit
git cc feat add a typo # starts interaction at the scope
git cc -m "invalid(stuff): should return 1"
```

### Configuration

See [`./commit_convention.yml`](./commit_convention.yml) for an example configuration file.

## Why write conventional commits through an interactive CLI?
## Why write conventional commits through an interactive CLI?

Figuring out what to write for an informative commit can be difficult.
The conventional commits standard helps figure out what to write.
As a bonus, conventional commits facilitate generating changelogs and semantic version increments.
An interactive command-line application helps with following the standard.


## Installation

Go to [the project releases page][releases page] to download the appropriate package. Alternately, use the installer script at [./scripts/install.sh](./scripts/install.sh).
Expand Down Expand Up @@ -62,16 +64,16 @@ chmod +x /tmp/install.sh
### From source with go

To compile from source, run `make install` inside the source directory.
You'll need to have a `go >= 1.13` toolchain and to have your `$GOPATH/bin` on your `$PATH`.
You'll need to have a `go >= 1.19` toolchain and to have your `$GOPATH/bin` on your `$PATH`.

## Prior art:

- [`committizen`][commitizen]
- [`commitsar`][commitsar]

<!-- links -->
[cc-standard]: https://www.conventionalcommits.org/en/v1.0.0/

[cc-standard]: https://www.conventionalcommits.org/en/v1.0.0/
[commitizen]: https://github.com/commitizen/cz-cli
[commitlint]: https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional
[commitsar]: https://github.com/commitsar-app/commitsar
Expand Down
2 changes: 2 additions & 0 deletions commit_convention.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ scopes:
- parser: parses conventional commits
- cli: UI for command-line invocation
- dist: the release; means of distribution
- devtools: tools for development

7 changes: 4 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
nixpkgs-fmt
rnix-lsp
gopls
gotools
nodejs
nodePackages.pnpm
goreleaser
ttyd
ffmpeg
vhs
# ttyd
# ffmpeg
# vhs
];
};
}
Expand Down

0 comments on commit 71cc1dd

Please sign in to comment.