Skip to content

Commit

Permalink
Merge pull request #7 from kyoh86/support-windows-for-6
Browse files Browse the repository at this point in the history
fix asset paths
  • Loading branch information
kyoh86 authored May 18, 2022
2 parents 2f42f2d + d28222c commit 4d195d3
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: reviewdog/action-golangci-lint@v1
with:
level: info
Expand Down
28 changes: 17 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
vendor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.15.x
go-version: 1.18.x
- name: get dependencies
run: go get -v -t -d ./...
- name: vendoring
Expand All @@ -26,20 +26,26 @@ jobs:
runs-on: ubuntu-latest
needs: vendor
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
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.32
version: v1.46

test:
runs-on: ubuntu-latest
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
needs: vendor
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: 1.15.x
go-version: 1.18.x
- uses: actions/download-artifact@v2
with:
name: repository
Expand All @@ -51,9 +57,9 @@ jobs:
runs-on: ubuntu-latest
needs: vendor
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: 1.15.x
go-version: 1.18.x
- uses: actions/download-artifact@v2
with:
name: repository
Expand Down
7 changes: 2 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
module github.com/kyoh86/go-spdx

require (
github.com/deadcheat/goblet v1.3.1
github.com/stretchr/testify v1.3.0
)
require github.com/stretchr/testify v1.3.0

go 1.13
go 1.16
7 changes: 0 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/deadcheat/goblet v1.3.1 h1:OPOYQjHlbPmG8fFCt8GNNGECLVhaJ0n7F7cP5Mh7G/A=
github.com/deadcheat/goblet v1.3.1/go.mod h1:IrMNyAwyrVgB30HsND2WgleTUM4wHTS9m40yNY6NJQg=
github.com/deadcheat/gonch v0.0.0-20180528124129-c2ff7a019863 h1:WiIagMEsLYiZCeD76SSLTJPdBdnmXkrFOFbI6Chf0xg=
github.com/deadcheat/gonch v0.0.0-20180528124129-c2ff7a019863/go.mod h1:/5mH3gAuXUxGN3maOBAxBfB8RXvP9tBIX5fx2x1k0V0=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
golang.org/x/net v0.0.0-20180404174746-b3c676e531a6/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
2 changes: 0 additions & 2 deletions spdx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ npm-install:

licenses-asset: npm-install
node fetch_list.js
goblet -g -p spdx -o licenses_asset.go --ignore-dotfiles ./json
gofmt -w licenses_asset.go

gen: parser.go licenses-asset

Expand Down
7 changes: 1 addition & 6 deletions spdx/licenses.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ var (
)

func init() {
licenses, err := Assets.File("/json/licenses.json")
if err != nil {
panic(err)
}
dec := json.NewDecoder(licenses)
if err := dec.Decode(&validLicenses); err != nil {
if err := json.Unmarshal(licenses, &validLicenses); err != nil {
panic(err)
}
for id, l := range validLicenses {
Expand Down
25 changes: 3 additions & 22 deletions spdx/licenses_asset.go

Large diffs are not rendered by default.

23 changes: 22 additions & 1 deletion spdx/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4d195d3

Please sign in to comment.