diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1eca993ff..70bd92de1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: run: | versions=$(curl -s 'https://go.dev/dl/?mode=json' | jq -c 'map(.version[2:])') echo "::set-output name=value::${versions}" - test_v3_module: + test: needs: go-versions strategy: fail-fast: false diff --git a/mktypes.sh b/mktypes.sh index 264ba1939..3e471f318 100644 --- a/mktypes.sh +++ b/mktypes.sh @@ -1,20 +1,16 @@ #!/bin/sh -PKGS="cpu disk docker host load mem net process" +PKGS="cpu disk docker host load mem net process sensors winservices" GOOS=$(go env GOOS) GOARCH=$(go env GOARCH) GOARCH=$(go env GOARCH) -for DIR in . +for PKG in $PKGS do - (cd "$DIR" || exit - for PKG in $PKGS - do - if [ -e "${PKG}/types_${GOOS}.go" ]; then - (echo "// +build $GOOS" - echo "// +build $GOARCH" - go tool cgo -godefs "${PKG}/types_${GOOS}.go") | gofmt > "${PKG}/${PKG}_${GOOS}_${GOARCH}.go" - fi - done) + if [ -e "${PKG}/types_${GOOS}.go" ]; then + (echo "// +build $GOOS" + echo "// +build $GOARCH" + go tool cgo -godefs "${PKG}/types_${GOOS}.go") | gofmt > "${PKG}/${PKG}_${GOOS}_${GOARCH}.go" + fi done