Skip to content

Commit

Permalink
development tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
kristofferlind committed Nov 6, 2022
1 parent 89c4b4f commit 116b3ff
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
knega
notes.md

dist/
21 changes: 21 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
changelog:
skip: true
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
build:
go mod download
go build -v

install: build
mv knega ~/bin

test: build
docker-compose down
docker-compose up -d
KNEGA=../../knega KNEGA_TRACE=true KNEGA_ALLOW_INSECURE_REGISTRY=true bats --print-output-on-failure --show-output-of-passing-tests test
docker-compose down

test-release:
goreleaser release --rm-dist --skip-publish --skip-sign --snapshot

.PHONY: build install test-release
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ Example configurations can be found in [examples/](./examples), [.knega.root.yml

## Usage
`knega changed/all <action>` where action is a set of commands defined in configuration. It will execute those commands for all or changed components with that action defined.

## Development
If you have [direnv](https://direnv.net/) and [nix package manager](https://nixos.org/) installed. You should be able to just start using commands found in Makefile. If you don't want those you can look at shell.nix to see what's needed.

0 comments on commit 116b3ff

Please sign in to comment.