Rename build script to avoid conflict with bazel
authorLincoln Stoll <lincoln.stoll@gmail.com>
Wed, 15 Mar 2017 04:53:56 +0000 (15:53 +1100)
committerLincoln Stoll <lincoln.stoll@gmail.com>
Wed, 15 Mar 2017 04:59:44 +0000 (15:59 +1100)
It's difficult to include this repository using bazel, because
the file named "build" conflicts with new_go_repository generation
on case-insensitive filesystems (ref
https://github.com/bazelbuild/rules_go/issues/234). This change
renames the file to something that doesn't conflict, and also
renames the test script for consistency.

.travis.yml
CONTRIBUTING.md
build.sh [moved from build with 100% similarity]
test.sh [moved from test with 97% similarity]

index 1e686ce..eb6b736 100644 (file)
@@ -38,9 +38,9 @@ install:
 script:
  - >
     if [ "${TARGET}" == "amd64" ]; then
-      GOARCH="${TARGET}" ./test;
+      GOARCH="${TARGET}" ./test.sh;
     else
-      GOARCH="${TARGET}" ./build;
+      GOARCH="${TARGET}" ./build.sh;
     fi
 
 notifications:
index 398f56d..817f072 100644 (file)
@@ -40,7 +40,7 @@ This is a rough outline of how to prepare a contribution:
 - If you changed code:
    - add automated tests to cover your changes, using the [Ginkgo](http://onsi.github.io/ginkgo/) & [Gomega](http://onsi.github.io/gomega/) style
    - if the package did not previously have any test coverage, add it to the list
-   of `TESTABLE` packages in the `test` script.
+   of `TESTABLE` packages in the `test.sh` script.
    - run the full test script and ensure it passes
 - Make sure any new code files have a license header (this is now enforced by automated tests)
 - Submit a pull request to the original repository.
@@ -59,7 +59,7 @@ sudo su
 cd /go/src/github.com/containernetworking/cni
 
 # to run the full test suite
-./test
+./test.sh
 
 # to focus on a particular test suite
 cd plugins/main/loopback
diff --git a/build b/build.sh
similarity index 100%
rename from build
rename to build.sh
diff --git a/test b/test.sh
similarity index 97%
rename from test
rename to test.sh
index 6629f22..3da1669 100755 (executable)
--- a/test
+++ b/test.sh
@@ -9,7 +9,7 @@
 #
 set -e
 
-source ./build
+source ./build.sh
 
 TESTABLE="libcni plugins/ipam/dhcp plugins/ipam/host-local plugins/ipam/host-local/backend/allocator plugins/main/loopback pkg/invoke pkg/ns pkg/skel pkg/types pkg/types/current pkg/types/020 pkg/utils plugins/main/ipvlan plugins/main/macvlan plugins/main/bridge plugins/main/ptp plugins/test/noop pkg/utils/hwaddr pkg/ip pkg/version pkg/version/testhelpers plugins/meta/flannel pkg/ipam"
 FORMATTABLE="$TESTABLE pkg/testutils plugins/meta/flannel plugins/meta/tuning"
@@ -40,13 +40,13 @@ function testrun {
 if [ ! -z "${COVERALLS}" ]; then
     echo "with coverage profile generation..."
     i=0
-    for t in ${TEST}; do 
+    for t in ${TEST}; do
         testrun "-coverprofile ${i}.coverprofile ${t}"
         i=$((i+1))
-    done 
+    done
     gover
     goveralls -service=travis-ci -coverprofile=gover.coverprofile -repotoken=$COVERALLS_TOKEN
-else 
+else
     echo "without coverage profile generation..."
     testrun "${TEST}"
 fi