Move scripts back to hack/, leave docs in project/

This also removes the now-defunct `*maintainer*.sh` scripts that don't work with the new TOML format, and moves a couple not-build-or-release-related scripts to `contrib/` instead.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
This commit is contained in:
Tianon Gravi 2015-03-12 20:16:56 -06:00
parent a97fbe7d78
commit 949a21b55f
38 changed files with 13 additions and 79 deletions

View file

@ -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:

View file

@ -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 <aanand.prasad@gmail.com>
Aaron Feng <aaron.feng@gmail.com>

View file

@ -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).

View file

@ -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

1
hack
View file

@ -1 +0,0 @@
project

View file

@ -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

View file

@ -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:

View file

@ -1,3 +0,0 @@
#!/bin/sh
find $1 -name MAINTAINERS -exec cat {} ';' | sed -E -e 's/^[^:]*: *(.*)$/\1/' | grep -E -v -e '^ *$' -e '^ *#.*$' | sort -u

View file

@ -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