diff --git a/.mailmap b/.mailmap index 00b698bba0..8a4500c76d 100644 --- a/.mailmap +++ b/.mailmap @@ -1,4 +1,4 @@ -# Generate AUTHORS: project/generate-authors.sh +# Generate AUTHORS: hack/generate-authors.sh # Tip for finding duplicates (besides scanning the output of AUTHORS for name # duplicates that aren't also email duplicates): scan the output of: diff --git a/AUTHORS b/AUTHORS index e6ec5d00f7..88fff3aa0a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,5 +1,5 @@ # This file lists all individuals having contributed content to the repository. -# For how it is generated, see `project/generate-authors.sh`. +# For how it is generated, see `hack/generate-authors.sh`. Aanand Prasad Aaron Feng diff --git a/project/stats.sh b/contrib/project-stats.sh similarity index 100% rename from project/stats.sh rename to contrib/project-stats.sh diff --git a/project/report-issue.sh b/contrib/report-issue.sh similarity index 100% rename from project/report-issue.sh rename to contrib/report-issue.sh diff --git a/docs/sources/project/set-up-dev-env.md b/docs/sources/project/set-up-dev-env.md index 2a30f2b3bb..a39649ba59 100644 --- a/docs/sources/project/set-up-dev-env.md +++ b/docs/sources/project/set-up-dev-env.md @@ -242,9 +242,9 @@ build and run a `docker` binary in your container. 4. From the `/go/src/github.com/docker/docker` directory make a `docker` binary with the `make.sh` script. - root@5f8630b873fe:/go/src/github.com/docker/docker# project/make.sh binary + root@5f8630b873fe:/go/src/github.com/docker/docker# hack/make.sh binary - You only call `project/make.sh` to build a binary _inside_ a Docker + You only call `hack/make.sh` to build a binary _inside_ a Docker development container as you are now. On your host, you'll use `make` commands (more about this later). diff --git a/docs/sources/project/test-and-docs.md b/docs/sources/project/test-and-docs.md index 3769198858..c1c422e724 100644 --- a/docs/sources/project/test-and-docs.md +++ b/docs/sources/project/test-and-docs.md @@ -133,7 +133,7 @@ Run the entire test suite on your current repository: ### Run test targets inside the development container If you are working inside a Docker development container, you use the -`project/make.sh` script to run tests. The `project/make.sh` script doesn't +`hack/make.sh` script to run tests. The `hack/make.sh` script doesn't have a single target that runs all the tests. Instead, you provide a single commmand line with multiple targets that does the same thing. @@ -148,9 +148,9 @@ Try this now. $ docker run --privileged --rm -ti -v `pwd`:/go/src/github.com/docker/docker dry-run-test /bin/bash -3. Run the tests using the `project/make.sh` script. +3. Run the tests using the `hack/make.sh` script. - root@5f8630b873fe:/go/src/github.com/docker/docker# project/make.sh dynbinary binary cross test-unit test-integration test-integration-cli test-docker-py + root@5f8630b873fe:/go/src/github.com/docker/docker# hack/make.sh dynbinary binary cross test-unit test-integration test-integration-cli test-docker-py The tests run just as they did within your local host. @@ -158,7 +158,7 @@ Try this now. Of course, you can also run a subset of these targets too. For example, to run just the unit tests: - root@5f8630b873fe:/go/src/github.com/docker/docker# project/make.sh dynbinary binary cross test-unit + root@5f8630b873fe:/go/src/github.com/docker/docker# hack/make.sh dynbinary binary cross test-unit Most test targets require that you build these precursor targets first: `dynbinary binary cross` @@ -174,7 +174,7 @@ your local host you can run the `TestBuild` test with this command: To run the same test inside your Docker development container, you do this: - root@5f8630b873fe:/go/src/github.com/docker/docker# TESTFLAGS='-run ^TestBuild$' project/make.sh + root@5f8630b873fe:/go/src/github.com/docker/docker# TESTFLAGS='-run ^TestBuild$' hack/make.sh ## If test under Boot2Docker fail do to space errors diff --git a/hack b/hack deleted file mode 120000 index e3f094ee63..0000000000 --- a/hack +++ /dev/null @@ -1 +0,0 @@ -project \ No newline at end of file diff --git a/project/dind b/hack/dind similarity index 100% rename from project/dind rename to hack/dind diff --git a/project/generate-authors.sh b/hack/generate-authors.sh similarity index 83% rename from project/generate-authors.sh rename to hack/generate-authors.sh index 4bd60364a4..e78a97f962 100755 --- a/project/generate-authors.sh +++ b/hack/generate-authors.sh @@ -8,7 +8,7 @@ cd "$(dirname "$(readlink -f "$BASH_SOURCE")")/.." { cat <<-'EOH' # This file lists all individuals having contributed content to the repository. - # For how it is generated, see `project/generate-authors.sh`. + # For how it is generated, see `hack/generate-authors.sh`. EOH echo git log --format='%aN <%aE>' | LC_ALL=C.UTF-8 sort -uf diff --git a/project/install.sh b/hack/install.sh similarity index 100% rename from project/install.sh rename to hack/install.sh diff --git a/project/make.sh b/hack/make.sh similarity index 100% rename from project/make.sh rename to hack/make.sh diff --git a/project/make/.dockerinit b/hack/make/.dockerinit similarity index 100% rename from project/make/.dockerinit rename to hack/make/.dockerinit diff --git a/project/make/.ensure-emptyfs b/hack/make/.ensure-emptyfs similarity index 100% rename from project/make/.ensure-emptyfs rename to hack/make/.ensure-emptyfs diff --git a/project/make/.ensure-frozen-images b/hack/make/.ensure-frozen-images similarity index 100% rename from project/make/.ensure-frozen-images rename to hack/make/.ensure-frozen-images diff --git a/project/make/.ensure-httpserver b/hack/make/.ensure-httpserver similarity index 100% rename from project/make/.ensure-httpserver rename to hack/make/.ensure-httpserver diff --git a/project/make/.go-autogen b/hack/make/.go-autogen similarity index 100% rename from project/make/.go-autogen rename to hack/make/.go-autogen diff --git a/project/make/.go-compile-test-dir b/hack/make/.go-compile-test-dir similarity index 100% rename from project/make/.go-compile-test-dir rename to hack/make/.go-compile-test-dir diff --git a/project/make/.integration-daemon-start b/hack/make/.integration-daemon-start similarity index 100% rename from project/make/.integration-daemon-start rename to hack/make/.integration-daemon-start diff --git a/project/make/.integration-daemon-stop b/hack/make/.integration-daemon-stop similarity index 100% rename from project/make/.integration-daemon-stop rename to hack/make/.integration-daemon-stop diff --git a/project/make/.validate b/hack/make/.validate similarity index 100% rename from project/make/.validate rename to hack/make/.validate diff --git a/project/make/README.md b/hack/make/README.md similarity index 82% rename from project/make/README.md rename to hack/make/README.md index 9cc88d441c..6574b0efe6 100644 --- a/project/make/README.md +++ b/hack/make/README.md @@ -4,11 +4,11 @@ Each script is named after the bundle it creates. They should not be called directly - instead, pass it as argument to make.sh, for example: ``` -./project/make.sh test -./project/make.sh binary ubuntu +./hack/make.sh test +./hack/make.sh binary ubuntu # Or to run all bundles: -./project/make.sh +./hack/make.sh ``` To add a bundle: diff --git a/project/make/binary b/hack/make/binary similarity index 100% rename from project/make/binary rename to hack/make/binary diff --git a/project/make/cover b/hack/make/cover similarity index 100% rename from project/make/cover rename to hack/make/cover diff --git a/project/make/cross b/hack/make/cross similarity index 100% rename from project/make/cross rename to hack/make/cross diff --git a/project/make/dynbinary b/hack/make/dynbinary similarity index 100% rename from project/make/dynbinary rename to hack/make/dynbinary diff --git a/project/make/test-docker-py b/hack/make/test-docker-py similarity index 100% rename from project/make/test-docker-py rename to hack/make/test-docker-py diff --git a/project/make/test-integration b/hack/make/test-integration similarity index 100% rename from project/make/test-integration rename to hack/make/test-integration diff --git a/project/make/test-integration-cli b/hack/make/test-integration-cli similarity index 100% rename from project/make/test-integration-cli rename to hack/make/test-integration-cli diff --git a/project/make/test-unit b/hack/make/test-unit similarity index 100% rename from project/make/test-unit rename to hack/make/test-unit diff --git a/project/make/tgz b/hack/make/tgz similarity index 100% rename from project/make/tgz rename to hack/make/tgz diff --git a/project/make/ubuntu b/hack/make/ubuntu similarity index 100% rename from project/make/ubuntu rename to hack/make/ubuntu diff --git a/project/make/validate-dco b/hack/make/validate-dco similarity index 100% rename from project/make/validate-dco rename to hack/make/validate-dco diff --git a/project/make/validate-gofmt b/hack/make/validate-gofmt similarity index 100% rename from project/make/validate-gofmt rename to hack/make/validate-gofmt diff --git a/project/make/validate-toml b/hack/make/validate-toml similarity index 100% rename from project/make/validate-toml rename to hack/make/validate-toml diff --git a/project/release.sh b/hack/release.sh similarity index 100% rename from project/release.sh rename to hack/release.sh diff --git a/project/vendor.sh b/hack/vendor.sh similarity index 100% rename from project/vendor.sh rename to hack/vendor.sh diff --git a/project/allmaintainers.sh b/project/allmaintainers.sh deleted file mode 100755 index 1ea5a9f743..0000000000 --- a/project/allmaintainers.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -find $1 -name MAINTAINERS -exec cat {} ';' | sed -E -e 's/^[^:]*: *(.*)$/\1/' | grep -E -v -e '^ *$' -e '^ *#.*$' | sort -u diff --git a/project/getmaintainer.sh b/project/getmaintainer.sh deleted file mode 100755 index ca532d42ec..0000000000 --- a/project/getmaintainer.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash -set -e - -if [ $# -ne 1 ]; then - echo >&2 "Usage: $0 PATH" - echo >&2 "Show the primary and secondary maintainers for a given path" - exit 1 -fi - -set -e - -DEST=$1 -DESTFILE="" -if [ ! -d $DEST ]; then - DESTFILE=$(basename $DEST) - DEST=$(dirname $DEST) -fi - -MAINTAINERS=() -cd $DEST -while true; do - if [ -e ./MAINTAINERS ]; then - { - while read line; do - re='^([^:]*): *(.*)$' - file=$(echo $line | sed -E -n "s/$re/\1/p") - if [ ! -z "$file" ]; then - if [ "$file" = "$DESTFILE" ]; then - echo "Override: $line" - maintainer=$(echo $line | sed -E -n "s/$re/\2/p") - MAINTAINERS=("$maintainer" "${MAINTAINERS[@]}") - fi - else - MAINTAINERS+=("$line"); - fi - done; - } < MAINTAINERS - break - fi - if [ -d .git ]; then - break - fi - if [ "$(pwd)" = "/" ]; then - break - fi - cd .. -done - -PRIMARY="${MAINTAINERS[0]}" -PRIMARY_FIRSTNAME=$(echo $PRIMARY | cut -d' ' -f1) -LGTM_COUNT=${#MAINTAINERS[@]} -LGTM_COUNT=$((LGTM_COUNT%2 +1)) - -firstname() { - echo $1 | cut -d' ' -f1 -} - -echo "A pull request in $1 will need $LGTM_COUNT LGTM's to be merged." -echo "--- $PRIMARY is the PRIMARY MAINTAINER of $1." -for SECONDARY in "${MAINTAINERS[@]:1}"; do - echo "--- $SECONDARY" -done