diff --git a/tools/build-plugins b/tools/build-plugins index 5ba9532..c88174b 100755 --- a/tools/build-plugins +++ b/tools/build-plugins @@ -26,14 +26,15 @@ fi echo $(pwd) plugin_name=$(basename $(dirname $gomod)) echo "plugin name: $plugin_name" -GOOS=linux GOARCH=arm64 go build -x -o "./build/$plugin_name.ocplugin.arm64" \ +cd $plugin_name +GOOS=linux GOARCH=arm64 go build -x -o "../build/$plugin_name.ocplugin.arm64" \ -ldflags \ "-X github.com/opencost/opencost/pkg/version.Version=$VERSION \ -X github.com/opencost/opencost/pkg/version.GitCommit=$COMMIT" \ - $(dirname $gomod)/cmd/main + ./cmd/main -GOOS=linux GOARCH=amd64 go build -x -o "./build/$plugin_name.ocplugin.amd64" \ +GOOS=linux GOARCH=amd64 go build -x -o "../build/$plugin_name.ocplugin.amd64" \ -ldflags \ "-X github.com/opencost/opencost/pkg/version.Version=$VERSION \ -X github.com/opencost/opencost/pkg/version.GitCommit=$COMMIT" \ - $(dirname $gomod)/cmd/main \ No newline at end of file + ./cmd/main \ No newline at end of file