Skip to content

Commit

Permalink
rename repo, add brew install
Browse files Browse the repository at this point in the history
  • Loading branch information
Jmainguy committed Jul 5, 2021
1 parent 0e0de9b commit de7cf81
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 34 deletions.
65 changes: 46 additions & 19 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,53 @@ on:

name: push
jobs:
test_build:
name: test, build
runs-on: ubuntu-latest
steps:
- name: install go
uses: actions/setup-go@v2.1.2
with:
go-version: '1.14.6'
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.29
test:
name: Test with Coverage
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: '1.16.3'
- name: Check out code
uses: actions/checkout@v2
- name: Install dependencies
run: |
go mod download
- name: Run Unit tests
run: |
go test -race -covermode atomic -coverprofile=covprofile ./...
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: covprofile
build:
name: test, build
runs-on: ubuntu-latest
steps:
- name: install go
uses: actions/setup-go@v2
with:
go-version: '1.16.3'

- name: git checkout
uses: actions/checkout@v2.3.2
- name: git checkout
uses: actions/checkout@v2

- name: install lint
run: GO111MODULE=off go get golang.org/x/lint/golint
- name: install lint
run: GO111MODULE=off go get golang.org/x/lint/golint

- name: run golint and go fmt
run: ./tests/fmtlint.sh
- name: run golint and go fmt
run: ./tests/fmtlint.sh

- name: go test
run: go test

- name: go build
run: go build
- name: go build
run: go build
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@ on:
name: release
jobs:
release:
name: run gorleaser
name: run goreleaser
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v2.3.2
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go
- name: install go
uses: actions/setup-go@v2
with:
go-version: 1.14.9
go-version: '1.16.3'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
czechDNS
czechdns
29 changes: 29 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ before:
hooks:
# you may remove this if you don't use vgo
- go mod tidy

builds:
- env:
- CGO_ENABLED=0
Expand All @@ -13,6 +14,7 @@ builds:
- windows
goarch:
- amd64

archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
Expand All @@ -23,18 +25,45 @@ archives:
format_overrides:
- goos: windows
format: zip

nfpms:
- file_name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
homepage: https://soh.re
description: A golang utility to check DNS records against expected results
maintainer: Jonathan Seth Mainguy <jon@soh.re>
license: GPLv2
vendor: Jmainguy
release: 1
replacements:
amd64: x86_64
overrides:
rpm:
file_name_template: "{{ .ProjectName }}-{{ .Version }}-{{.Release}}.{{ .Arch }}"
deb:
file_name_template: "{{ .ProjectName }}_{{ .Version }}-{{.Release}}_{{ .Arch }}"
formats:
- deb
- rpm

brews:
- tap:
owner: jmainguy
name: homebrew-tap
folder: Formula
homepage: https://github.com/Jmainguy/czechdns
description: "A golang utility to check DNS records against expected results"
license: "GPL-2.0"
commit_author:
name: Jonathan Mainguy
email: jon@soh.re
test: |
system "#{bin}/czechdns"
install: |
bin.install "czechdns"
checksum:
name_template: 'checksums.txt'

changelog:
sort: asc
filters:
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
# czechDNS
# czechdns


## Usage
```
# Create a file with a list of hostnames
oc get routes --all-namespaces --no-headers | awk '{print $3}' > tests/example_routes
# Create test file from a list of hostnames
./czechDNS -createTest=true -hostsFile ./tests/example_routes -testFile tests/example_tests
./czechdns -createTest=true -hostsFile ./tests/example_routes -testFile tests/example_tests
# Run test against a nameserver you wish to czech
./czechDNS -testFile tests/example_tests -server ns-1684.awsdns-18.co.uk
./czechdns -testFile tests/example_tests -server ns-1684.awsdns-18.co.uk
```

## Install

### Homebrew

```/bin/bash
brew install jmainguy/tap/czechdns
```

## PreBuilt Binaries
Grab Binaries from [The Releases Page](https://github.com/Jmainguy/czechDNS/releases)
Grab Binaries from [The Releases Page](https://github.com/Jmainguy/czechdns/releases)

## Build
```/bin/bash
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/jmainguy/czechDNS
module github.com/jmainguy/czechdns

go 1.15
go 1.16

require gopkg.in/yaml.v2 v2.3.0
require gopkg.in/yaml.v2 v2.4.0 // indirect
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=

0 comments on commit de7cf81

Please sign in to comment.