mirror of
https://github.com/mikefarah/yq.git
synced 2026-07-05 12:10:37 +00:00
Fixing build
This commit is contained in:
parent
1b9b4ac518
commit
e3cb1dc7c6
@ -1,3 +1,5 @@
|
|||||||
|
//go:build goinstall
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -11,6 +13,10 @@ import (
|
|||||||
// TestGoInstallCompatibility ensures the module can be zipped for go install.
|
// TestGoInstallCompatibility ensures the module can be zipped for go install.
|
||||||
// This is an integration test that uses the same zip.CreateFromDir function
|
// This is an integration test that uses the same zip.CreateFromDir function
|
||||||
// that go install uses internally. If this test fails, go install will fail.
|
// that go install uses internally. If this test fails, go install will fail.
|
||||||
|
//
|
||||||
|
// Built with the goinstall tag and run after the main test suite (see scripts/test.sh)
|
||||||
|
// so it does not race with pkg/yqlib tests that rewrite doc/*.md during execution.
|
||||||
|
//
|
||||||
// See: https://github.com/mikefarah/yq/issues/2587
|
// See: https://github.com/mikefarah/yq/issues/2587
|
||||||
func TestGoInstallCompatibility(t *testing.T) {
|
func TestGoInstallCompatibility(t *testing.T) {
|
||||||
mod := module.Version{
|
mod := module.Version{
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
go test $(go list ./... | grep -v -E 'examples' | grep -v -E 'test')
|
go test $(go list ./... | grep -v -E 'examples' | grep -v -E 'test')
|
||||||
|
|
||||||
|
# Run after the main test suite: TestGoInstallCompatibility zips the module tree and
|
||||||
|
# must not run in parallel with pkg/yqlib tests that rewrite doc/*.md files.
|
||||||
|
go test -tags goinstall -run TestGoInstallCompatibility .
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user