Skip to content

Commit

Permalink
chore: hard code OSX paths to /opt/pact for now
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Mar 11, 2021
1 parent 124b693 commit 5f21f62
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
12 changes: 7 additions & 5 deletions v3/installer/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ import (
getter "github.com/hashicorp/go-getter"
goversion "github.com/hashicorp/go-version"

// can't use these packages, because then the CLI installer wouldn't work - go won't run without it!
// "github.com/pact-foundation/pact-go/v3/internal/native/verifier"
// mockserver "github.com/pact-foundation/pact-go/v3/internal/native/mock_server"
// verifier "github.com/pact-foundation/pact-go/v3/internal/native/verifier"

"github.com/spf13/afero"
)

Expand Down Expand Up @@ -125,7 +127,7 @@ func (i *Installer) checkPackageInstall() error {
return err
}

// if err := checkVersion(info.testCommand(), info.libName, info.semverRange); err != nil {
// if err := checkVersion(info.libName, info.testCommand(), info.semverRange); err != nil {
// return err
// }
}
Expand Down Expand Up @@ -255,15 +257,15 @@ var packages = map[string]packageInfo{
verifierPackage: {
libName: "libpact_verifier_ffi",
version: "0.0.2",
semverRange: ">= 0.8.3, < 1.0.0",
semverRange: ">= 0.0.2, < 1.0.0",
// testCommand: func() string {
// return (&verifier.Verifier{}).Version()
// },
},
mockServerPackage: {
libName: "libpact_mock_server_ffi",
version: "0.0.14",
semverRange: ">= 0.0.14, < 1.0.0",
version: "0.0.15",
semverRange: ">= 0.0.15, < 1.0.0",
// testCommand: func() string {
// return mockserver.Version()
// },
Expand Down
1 change: 0 additions & 1 deletion v3/internal/native/mock_server/mock_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ func GetTLSConfig() *tls.Config {
// Version returns the current semver FFI interface version
func Version() string {
v := C.version()
defer libRustFree(v)

return C.GoString(v)
}
Expand Down
2 changes: 1 addition & 1 deletion v3/internal/native/mock_server/mock_server_darwin.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mock_server

/*
#cgo LDFLAGS: -v ${SRCDIR}/../../../../libs/libpact_mock_server_ffi.dylib
#cgo LDFLAGS: -v /opt/pact/libpact_mock_server_ffi.dylib
// NOTE: have to rename the id in the library using this command:
Expand Down
2 changes: 1 addition & 1 deletion v3/internal/native/verifier/verifier_darwin.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package verifier

/*
#cgo LDFLAGS: ${SRCDIR}/../../../../libs/libpact_verifier_ffi.dylib
#cgo LDFLAGS: -v /opt/pact/libpact_verifier_ffi.dylib
// Library headers
typedef int bool;
Expand Down

0 comments on commit 5f21f62

Please sign in to comment.