-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from mroth/cleanup
Cleanup: five year maintenance
- Loading branch information
Showing
78 changed files
with
788 additions
and
7,907 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14 | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: ["1.14"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: Cache modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Run tests | ||
run: go test -race ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
bin | ||
.tokens | ||
builds | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
before: | ||
hooks: | ||
- go mod download | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- amd64 | ||
main: ./cmd/slacknimate | ||
archives: | ||
- format_overrides: | ||
- goos: windows | ||
format: zip | ||
checksum: | ||
name_template: "checksums.txt" | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
skip: true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,19 @@ | ||
.PHONY: build_deps build goinstall gouninstall package_deps package clobber | ||
.PHONY: build_deps build package_deps package clobber | ||
.DEFAULT_GOAL := build | ||
|
||
build_deps: | ||
@type go >/dev/null 2>&1 || \ | ||
{ echo >&2 "I require go but it is not installed. Aborting."; exit 1; } | ||
|
||
build: build_deps | ||
go build -o bin/slacknimate | ||
go build -o bin/slacknimate ./cmd/slacknimate | ||
|
||
|
||
# Standard go install, for people with a valid go / $GOPATH setup | ||
goinstall: | ||
go install . | ||
|
||
gouninstall: | ||
rm $(GOPATH)/bin/slacknimate | ||
|
||
|
||
# For cross compiling and packaging releases | ||
package_deps: | ||
go get github.com/laher/goxc | ||
|
||
package: package_deps build | ||
goxc -pv=`./bin/slacknimate -v | cut -d' ' -f3` \ | ||
--resources-include="README*,LICENSE*,examples" \ | ||
-d="builds" -bc="linux,!arm darwin windows" xc archive rmbin | ||
@type goreleaser >/dev/null 2>&1 || \ | ||
{ echo >&2 "I require goreleaser but it is not installed. Aborting."; exit 1; } | ||
|
||
package: package_deps | ||
goreleaser release --rm-dist --skip-publish | ||
|
||
clobber: | ||
rm -rf builds bin | ||
rm -rf dist bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.