github.com/bdwilliams/libcompose@v0.3.1-0.20160826154243-d81a9bdacff0/script/make.sh (about)

     1  #!/usr/bin/env bash
     2  set -e
     3  
     4  export LIBCOMPOSE_PKG='github.com/docker/libcompose'
     5  
     6  # List of bundles to create when no argument is passed
     7  DEFAULT_BUNDLES=(
     8      validate-gofmt
     9      validate-dco
    10      validate-git-marks
    11      validate-lint
    12      validate-vet
    13      binary
    14  
    15      test-unit
    16      test-integration
    17      test-acceptance
    18  
    19      cross-binary
    20  )
    21  bundle() {
    22      local bundle="$1"; shift
    23      echo "---> Making bundle: $(basename "$bundle") (in $DEST)"
    24      source "script/$bundle" "$@"
    25  }
    26  
    27  if [ $# -lt 1 ]; then
    28      bundles=(${DEFAULT_BUNDLES[@]})
    29  else
    30      bundles=($@)
    31  fi
    32  for bundle in ${bundles[@]}; do
    33      export DEST=.
    34      ABS_DEST="$(cd "$DEST" && pwd -P)"
    35      bundle "$bundle"
    36      echo
    37  done