Fix go-systemd import with Go modules

See https://github.com/coreos/go-systemd/issues/321
pull/148/head
Jeremy Rand 3 years ago
parent 468f40c70e
commit 5e6b643ad6
No known key found for this signature in database
GPG Key ID: FD7550C2EB800711

@ -37,8 +37,7 @@ task:
fetch_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- go mod init
- go mod tidy
- go mod edit -replace github.com/namecoin/x509-compressed=../x509-compressed
- go mod edit -replace github.com/coreos/go-systemd=github.com/coreos/go-systemd/v22@latest -replace github.com/namecoin/x509-compressed=../x509-compressed
- go mod tidy
lint_script:
- cd $(go env GOPATH)/src/github.com/$CIRRUS_REPO_FULL_NAME/
@ -118,8 +117,7 @@ task:
fetch_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- go mod init
- go mod tidy
- go mod edit -replace github.com/namecoin/x509-compressed=../x509-compressed
- go mod edit -replace github.com/coreos/go-systemd=github.com/coreos/go-systemd/v22@latest -replace github.com/namecoin/x509-compressed=../x509-compressed
- go mod tidy
# Get the test suite
- mkdir -p $(go env GOPATH)/src/github.com/hlandau
@ -175,8 +173,7 @@ task:
fetch_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- go mod init
- go mod tidy
- go mod edit -replace github.com/namecoin/x509-compressed=../x509-compressed
- go mod edit -replace github.com/coreos/go-systemd=github.com/coreos/go-systemd/v22@latest -replace github.com/namecoin/x509-compressed=../x509-compressed
- go mod tidy
build_script:
- rm -rf idist

@ -5,3 +5,4 @@ linters-settings:
replace-local: true
replace-allow-list:
- "github.com/namecoin/x509-compressed"
- "github.com/coreos/go-systemd"

@ -113,8 +113,7 @@ Option B: Using Go build commands with Go modules (works on any platform with Ba
~~~
go mod init
go mod tidy
go mod edit -replace github.com/namecoin/x509-compressed=../x509-compressed
go mod edit -replace github.com/coreos/go-systemd=github.com/coreos/go-systemd/v22@latest -replace github.com/namecoin/x509-compressed=../x509-compressed
go mod tidy
~~~

Loading…
Cancel
Save