mirror of
https://github.com/containers/skopeo.git
synced 2025-08-11 03:12:26 +00:00
Remove some outright unused code from hack/make*
Should not affect observable behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
cd1c43c65d
commit
835d71a3a4
22
hack/make.sh
22
hack/make.sh
@ -20,7 +20,6 @@ set -o pipefail
|
|||||||
|
|
||||||
export SKOPEO_PKG='github.com/containers/skopeo'
|
export SKOPEO_PKG='github.com/containers/skopeo'
|
||||||
export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
export MAKEDIR="$SCRIPTDIR/make"
|
|
||||||
|
|
||||||
# Set this to 1 to enable installation/modification of environment/services
|
# Set this to 1 to enable installation/modification of environment/services
|
||||||
export SKOPEO_CONTAINER_TESTS=${SKOPEO_CONTAINER_TESTS:-0}
|
export SKOPEO_CONTAINER_TESTS=${SKOPEO_CONTAINER_TESTS:-0}
|
||||||
@ -39,19 +38,6 @@ fi
|
|||||||
|
|
||||||
echo
|
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
|
# Go module support: set `-mod=vendor` to use the vendored sources
|
||||||
# See also the top-level Makefile.
|
# 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#.}"
|
echo '+ go test' $mod_vendor $TESTFLAGS ${BUILDTAGS:+-tags "$BUILDTAGS"} "${SKOPEO_PKG}${dir#.}"
|
||||||
cd "$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"}
|
go test $mod_vendor $TESTFLAGS ${BUILDTAGS:+-tags "$BUILDTAGS"}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -79,11 +64,10 @@ bundle() {
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
if [ $# -lt 1 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
bundles=(${DEFAULT_BUNDLES[@]})
|
echo 'At least one "bundle" argument expected' >&2
|
||||||
else
|
return 1
|
||||||
bundles=($@)
|
|
||||||
fi
|
fi
|
||||||
for bundle in ${bundles[@]}; do
|
for bundle in $@; do
|
||||||
bundle "$bundle"
|
bundle "$bundle"
|
||||||
echo
|
echo
|
||||||
done
|
done
|
||||||
|
@ -7,25 +7,10 @@ if [ -z "$VALIDATE_UPSTREAM" ]; then
|
|||||||
VALIDATE_REPO='https://github.com/containers/skopeo.git'
|
VALIDATE_REPO='https://github.com/containers/skopeo.git'
|
||||||
VALIDATE_BRANCH='main'
|
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"
|
git fetch -q "$VALIDATE_REPO" "refs/heads/$VALIDATE_BRANCH"
|
||||||
VALIDATE_UPSTREAM="$(git rev-parse --verify FETCH_HEAD)"
|
VALIDATE_UPSTREAM="$(git rev-parse --verify FETCH_HEAD)"
|
||||||
|
|
||||||
VALIDATE_COMMIT_LOG="$VALIDATE_UPSTREAM..$VALIDATE_HEAD"
|
|
||||||
VALIDATE_COMMIT_DIFF="$VALIDATE_UPSTREAM...$VALIDATE_HEAD"
|
|
||||||
|
|
||||||
validate_diff() {
|
validate_diff() {
|
||||||
git diff "$VALIDATE_UPSTREAM" "$@"
|
git diff "$VALIDATE_UPSTREAM" "$@"
|
||||||
}
|
}
|
||||||
validate_log() {
|
|
||||||
if [ "$VALIDATE_UPSTREAM" != "$VALIDATE_HEAD" ]; then
|
|
||||||
git log "$VALIDATE_COMMIT_LOG" "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
fi
|
fi
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
bundle_test_integration() {
|
|
||||||
go_test_dir ./integration
|
|
||||||
}
|
|
||||||
|
|
||||||
# subshell so that we can export PATH without breaking other things
|
|
||||||
(
|
(
|
||||||
make PREFIX=/usr install
|
make PREFIX=/usr install
|
||||||
bundle_test_integration
|
go_test_dir ./integration
|
||||||
) 2>&1
|
) 2>&1
|
||||||
|
Loading…
Reference in New Issue
Block a user