diff --git a/hack/make.sh b/hack/make.sh index cd06cb2d..83ed2ffc 100755 --- a/hack/make.sh +++ b/hack/make.sh @@ -20,7 +20,6 @@ set -o pipefail export SKOPEO_PKG='github.com/containers/skopeo' export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -export MAKEDIR="$SCRIPTDIR/make" # Set this to 1 to enable installation/modification of environment/services export SKOPEO_CONTAINER_TESTS=${SKOPEO_CONTAINER_TESTS:-0} @@ -39,19 +38,6 @@ fi echo -# List of bundles to create when no argument is passed -# TODO(runcom): these are the one left from Docker...for now -# test-unit -# validate-dco -# cover -DEFAULT_BUNDLES=( - validate-gofmt - validate-lint - validate-vet - validate-git-marks - - test-integration -) # Go module support: set `-mod=vendor` to use the vendored sources # See also the top-level Makefile. @@ -66,7 +52,6 @@ go_test_dir() { ( echo '+ go test' $mod_vendor $TESTFLAGS ${BUILDTAGS:+-tags "$BUILDTAGS"} "${SKOPEO_PKG}${dir#.}" cd "$dir" - export DEST="$ABS_DEST" # we're in a subshell, so this is safe -- our integration-cli tests need DEST, and "cd" screws it up go test $mod_vendor $TESTFLAGS ${BUILDTAGS:+-tags "$BUILDTAGS"} ) } @@ -79,11 +64,10 @@ bundle() { main() { if [ $# -lt 1 ]; then - bundles=(${DEFAULT_BUNDLES[@]}) - else - bundles=($@) + echo 'At least one "bundle" argument expected' >&2 + return 1 fi - for bundle in ${bundles[@]}; do + for bundle in $@; do bundle "$bundle" echo done diff --git a/hack/make/.validate b/hack/make/.validate index c72a5a4e..e5919729 100644 --- a/hack/make/.validate +++ b/hack/make/.validate @@ -6,26 +6,11 @@ if [ -z "$VALIDATE_UPSTREAM" ]; then VALIDATE_REPO='https://github.com/containers/skopeo.git' VALIDATE_BRANCH='main' - - if [ "$TRAVIS" = 'true' -a "$TRAVIS_PULL_REQUEST" != 'false' ]; then - VALIDATE_REPO="https://github.com/${TRAVIS_REPO_SLUG}.git" - VALIDATE_BRANCH="${TRAVIS_BRANCH}" - fi - - VALIDATE_HEAD="$(git rev-parse --verify HEAD)" - + git fetch -q "$VALIDATE_REPO" "refs/heads/$VALIDATE_BRANCH" VALIDATE_UPSTREAM="$(git rev-parse --verify FETCH_HEAD)" - - VALIDATE_COMMIT_LOG="$VALIDATE_UPSTREAM..$VALIDATE_HEAD" - VALIDATE_COMMIT_DIFF="$VALIDATE_UPSTREAM...$VALIDATE_HEAD" - + validate_diff() { git diff "$VALIDATE_UPSTREAM" "$@" } - validate_log() { - if [ "$VALIDATE_UPSTREAM" != "$VALIDATE_HEAD" ]; then - git log "$VALIDATE_COMMIT_LOG" "$@" - fi - } fi diff --git a/hack/make/test-integration b/hack/make/test-integration index 3c9e8717..a9c69b98 100755 --- a/hack/make/test-integration +++ b/hack/make/test-integration @@ -1,12 +1,7 @@ #!/bin/bash set -e -bundle_test_integration() { - go_test_dir ./integration -} - -# subshell so that we can export PATH without breaking other things ( make PREFIX=/usr install - bundle_test_integration + go_test_dir ./integration ) 2>&1