Skip to content

Commit

Permalink
Merge pull request #2 from gobuffalo/init
Browse files Browse the repository at this point in the history
actions
  • Loading branch information
markbates authored Nov 23, 2019
2 parents a049b3c + 520e2cb commit 149d599
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 113 deletions.
3 changes: 2 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# These are supported funding model platforms

github: [@markbates]
github: markbates
patreon: buffalo
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release
on:
release:
types:
- published

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
-
name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
-
name: Checkout Code
uses: actions/checkout@master
-
name: Run GoReleaser
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
22 changes: 22 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Tests
on: [push]
jobs:

tests-on:
name: ${{matrix.go-version}} ${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.12.x, 1.13.x]
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout Code
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Test
run: |
go mod tidy -v
go test -race ./...
58 changes: 36 additions & 22 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,45 @@
# Code generated by github.com/gobuffalo/release. DO NOT EDIT.
# Edit .goreleaser.yml.plush instead

builds:
-
goos:
- darwin
- linux
- windows
env:
- CGO_ENABLED=0
main: cmd/here/main.go

-
main: ./cmd/here/main.go
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X "github.com/gobuffalo/here.Version={{.Tag}}"
goos:
- darwin
- linux
- windows
goarch:
- amd64
- 386
- arm
- arm64
goarm:
- 6
- 7
archives:
-
replacements:
'386': i386
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
checksum:
name_template: 'checksums.txt'

name_template: checksums.txt
snapshot:
name_template: "{{ .Tag }}-next"

name_template: '{{ .Tag }}-next'
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

brew:
github:
owner: gobuffalo
name: homebrew-tap

brews:
-
name: 'here'
github:
owner: 'gobuffalo'
name: 'homebrew-tap'
install: |
bin.install "here"
28 changes: 0 additions & 28 deletions .goreleaser.yml.plush

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Here

[![](https://github.com/gobuffalo/here/workflows/Tests/badge.svg)](https://github.com/gobuffalo/here/actions)
[![GoDoc](https://godoc.org/github.com/gobuffalo/here?status.svg)](https://godoc.org/github.com/gobuffalo/here)

Here will get you **accurate** Go information about the directory of package requested.
Expand Down
39 changes: 0 additions & 39 deletions azure-pipelines.yml

This file was deleted.

19 changes: 0 additions & 19 deletions azure-tests.yml

This file was deleted.

3 changes: 1 addition & 2 deletions dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package here

import (
"encoding/json"
"fmt"
"os"
"path/filepath"
)
Expand Down Expand Up @@ -38,7 +37,7 @@ func (h Here) Dir(p string) (Info, error) {
if nonGoDirRx.MatchString(err.Error()) {
return fromNonGoDir(p)
}
return i, fmt.Errorf("%w %s", err, p)
return i, err
}

if err := json.Unmarshal(b, &i); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion here.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func run(n string, args ...string) ([]byte, error) {
c.Stderr = ebb
err := c.Run()
if err != nil {
return nil, fmt.Errorf("%w: %s", err, ebb)
return nil, fmt.Errorf("%s: %s", err, ebb)
}

return bb.Bytes(), nil
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package here

// Version of here
const Version = "v0.4.2"
var Version = "development"

0 comments on commit 149d599

Please sign in to comment.