mirror of https://github.com/docker/docs.git
Merge pull request #11373 from tianon/move-hack-scripts-back
Move scripts back to hack/, leave docs in project/
This commit is contained in:
commit
d2f925fb27
2
.mailmap
2
.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
|
# Tip for finding duplicates (besides scanning the output of AUTHORS for name
|
||||||
# duplicates that aren't also email duplicates): scan the output of:
|
# duplicates that aren't also email duplicates): scan the output of:
|
||||||
|
|
2
AUTHORS
2
AUTHORS
|
@ -1,5 +1,5 @@
|
||||||
# This file lists all individuals having contributed content to the repository.
|
# 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>
|
Aanand Prasad <aanand.prasad@gmail.com>
|
||||||
Aaron Feng <aaron.feng@gmail.com>
|
Aaron Feng <aaron.feng@gmail.com>
|
||||||
|
|
|
@ -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.
|
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`
|
development container as you are now. On your host, you'll use `make`
|
||||||
commands (more about this later).
|
commands (more about this later).
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ Run the entire test suite on your current repository:
|
||||||
### Run test targets inside the development container
|
### Run test targets inside the development container
|
||||||
|
|
||||||
If you are working inside a Docker development container, you use the
|
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
|
have a single target that runs all the tests. Instead, you provide a single
|
||||||
commmand line with multiple targets that does the same thing.
|
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
|
$ 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.
|
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
|
Of course, you can also run a subset of these targets too. For example, to run
|
||||||
just the unit tests:
|
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:
|
Most test targets require that you build these precursor targets first:
|
||||||
`dynbinary binary cross`
|
`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:
|
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
|
## If test under Boot2Docker fail do to space errors
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ cd "$(dirname "$(readlink -f "$BASH_SOURCE")")/.."
|
||||||
{
|
{
|
||||||
cat <<-'EOH'
|
cat <<-'EOH'
|
||||||
# This file lists all individuals having contributed content to the repository.
|
# 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
|
EOH
|
||||||
echo
|
echo
|
||||||
git log --format='%aN <%aE>' | LC_ALL=C.UTF-8 sort -uf
|
git log --format='%aN <%aE>' | LC_ALL=C.UTF-8 sort -uf
|
|
@ -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:
|
They should not be called directly - instead, pass it as argument to make.sh, for example:
|
||||||
|
|
||||||
```
|
```
|
||||||
./project/make.sh test
|
./hack/make.sh test
|
||||||
./project/make.sh binary ubuntu
|
./hack/make.sh binary ubuntu
|
||||||
|
|
||||||
# Or to run all bundles:
|
# Or to run all bundles:
|
||||||
./project/make.sh
|
./hack/make.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
To add a bundle:
|
To add a bundle:
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
find $1 -name MAINTAINERS -exec cat {} ';' | sed -E -e 's/^[^:]*: *(.*)$/\1/' | grep -E -v -e '^ *$' -e '^ *#.*$' | sort -u
|
|
|
@ -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
|
|
Loading…
Reference in New Issue