From 3b8130c3d44f4baf7d40a952333f21fe2db6461e Mon Sep 17 00:00:00 2001 From: Nate Finch Date: Wed, 17 Jul 2019 22:27:12 -0400 Subject: [PATCH 1/3] fix tests when running in module mode --- go.mod | 2 ++ mage/testdata/mixed_lib_files/magefile.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index d702af13..8261fa13 100644 --- a/go.mod +++ b/go.mod @@ -1 +1,3 @@ module github.com/magefile/mage + +go 1.12 diff --git a/mage/testdata/mixed_lib_files/magefile.go b/mage/testdata/mixed_lib_files/magefile.go index e9604289..f1ecc31d 100644 --- a/mage/testdata/mixed_lib_files/magefile.go +++ b/mage/testdata/mixed_lib_files/magefile.go @@ -2,7 +2,7 @@ package main -import "./subdir" +import "github.com/magefile/mage/testdata/mixed_lib_files/subdir" func Build() { subdir.Build() From 9a75cc56e73ca002da4cbc09dd9962727930419c Mon Sep 17 00:00:00 2001 From: Nate Finch Date: Wed, 17 Jul 2019 22:35:55 -0400 Subject: [PATCH 2/3] add go.mod --- mage/testdata/mixed_lib_files/go.mod | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 mage/testdata/mixed_lib_files/go.mod diff --git a/mage/testdata/mixed_lib_files/go.mod b/mage/testdata/mixed_lib_files/go.mod new file mode 100644 index 00000000..6155b766 --- /dev/null +++ b/mage/testdata/mixed_lib_files/go.mod @@ -0,0 +1,3 @@ +module github.com/magefile/mage/testdata/mixed_lib_files + +go 1.12 From 63f249a002fe437892ecab0d06b5b28741f36005 Mon Sep 17 00:00:00 2001 From: Nate Finch Date: Wed, 17 Jul 2019 23:40:16 -0400 Subject: [PATCH 3/3] fix full import path and add 1.12.x explicitly to the travis build --- .travis.yml | 1 + mage/testdata/mixed_lib_files/go.mod | 3 --- mage/testdata/mixed_lib_files/magefile.go | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 mage/testdata/mixed_lib_files/go.mod diff --git a/.travis.yml b/.travis.yml index f7e0703e..3522bb59 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ branches: # library, I'm not going to worry about older versions for now. go: - tip + - 1.12.x - 1.11.x - 1.10.x - 1.9.x diff --git a/mage/testdata/mixed_lib_files/go.mod b/mage/testdata/mixed_lib_files/go.mod deleted file mode 100644 index 6155b766..00000000 --- a/mage/testdata/mixed_lib_files/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/magefile/mage/testdata/mixed_lib_files - -go 1.12 diff --git a/mage/testdata/mixed_lib_files/magefile.go b/mage/testdata/mixed_lib_files/magefile.go index f1ecc31d..3c30feba 100644 --- a/mage/testdata/mixed_lib_files/magefile.go +++ b/mage/testdata/mixed_lib_files/magefile.go @@ -2,7 +2,7 @@ package main -import "github.com/magefile/mage/testdata/mixed_lib_files/subdir" +import "github.com/magefile/mage/mage/testdata/mixed_lib_files/subdir" func Build() { subdir.Build()