| ... | ... |
@@ -73,21 +73,6 @@ bundle_binary() {
|
| 73 | 73 |
./docker |
| 74 | 74 |
} |
| 75 | 75 |
|
| 76 |
- |
|
| 77 |
-# Build Docker's test suite as a collection of binary files (one per |
|
| 78 |
-# sub-package to test) |
|
| 79 |
-bundle_test() {
|
|
| 80 |
- mkdir -p bundles/$VERSION/test |
|
| 81 |
- for test_dir in $(find_test_dirs); do |
|
| 82 |
- test_binary=$( |
|
| 83 |
- cd $test_dir |
|
| 84 |
- go test -c -v -ldflags "-X main.GITCOMMIT $GITCOMMIT -X main.VERSION $VERSION -d -w" >&2 |
|
| 85 |
- find . -maxdepth 1 -type f -name '*.test' -executable |
|
| 86 |
- ) |
|
| 87 |
- cp $test_dir/$test_binary bundles/$VERSION/test/ |
|
| 88 |
- done |
|
| 89 |
-} |
|
| 90 |
- |
|
| 91 | 76 |
# Build docker as an ubuntu package using FPM and REPREPRO (sue me). |
| 92 | 77 |
# bundle_binary must be called first. |
| 93 | 78 |
bundle_ubuntu() {
|
| ... | ... |
@@ -148,20 +133,9 @@ EOF |
| 148 | 148 |
} |
| 149 | 149 |
|
| 150 | 150 |
|
| 151 |
-# This helper function walks the current directory looking for directories |
|
| 152 |
-# holding Go test files, and prints their paths on standard output, one per |
|
| 153 |
-# line. |
|
| 154 |
-find_test_dirs() {
|
|
| 155 |
- find . -name '*_test.go' | |
|
| 156 |
- { while read f; do dirname $f; done; } |
|
|
| 157 |
- sort -u |
|
| 158 |
-} |
|
| 159 |
- |
|
| 160 |
- |
|
| 161 | 151 |
main() {
|
| 162 | 152 |
bundle_binary |
| 163 | 153 |
bundle_ubuntu |
| 164 |
- #bundle_test |
|
| 165 | 154 |
cat <<EOF |
| 166 | 155 |
############################################################################### |
| 167 | 156 |
Now run the resulting image, making sure that you set AWS_S3_BUCKET, |