2017-11-02 19:31:21 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -xeuo pipefail
|
|
|
|
|
2017-11-03 19:37:22 +00:00
|
|
|
export GOPATH=/go
|
2017-11-02 19:31:21 +00:00
|
|
|
export PATH=$HOME/gopath/bin:$PATH
|
2017-11-03 19:37:22 +00:00
|
|
|
export GOSRC=/$GOPATH/src/github.com/projectatomic/libpod
|
|
|
|
|
2017-11-02 19:31:21 +00:00
|
|
|
|
|
|
|
# PAPR adds a merge commit, for testing, which fails the
|
|
|
|
# short-commit-subject validation test, so tell git-validate.sh to only check
|
|
|
|
# up to, but not including, the merge commit.
|
|
|
|
export GITVALIDATE_TIP=$(cd $GOSRC; git log -2 --pretty='%H' | tail -n 1)
|
|
|
|
export TAGS="seccomp $($GOSRC/hack/btrfs_tag.sh) $($GOSRC/hack/libdm_tag.sh) $($GOSRC/hack/btrfs_installed_tag.sh) $($GOSRC/hack/ostree_tag.sh) $($GOSRC/hack/selinux_tag.sh)"
|
2017-11-03 19:37:22 +00:00
|
|
|
|
2018-01-24 14:45:55 +00:00
|
|
|
make gofmt TAGS="${TAGS}"
|
2018-03-07 15:14:17 +00:00
|
|
|
make localunit TAGS="${TAGS}"
|
2018-01-18 19:17:28 +00:00
|
|
|
|
2017-11-03 19:37:22 +00:00
|
|
|
make install.tools TAGS="${TAGS}"
|
|
|
|
|
|
|
|
# Only check lint and gitvalidation on more recent
|
|
|
|
# distros with updated git and tooling
|
2018-01-24 14:45:55 +00:00
|
|
|
if [[ ${DIST} == "Fedora" ]]; then
|
2017-11-03 19:37:22 +00:00
|
|
|
HEAD=$GITVALIDATE_TIP make -C $GOSRC .gitvalidation TAGS="${TAGS}"
|
|
|
|
make lint
|
|
|
|
fi
|
|
|
|
|
2018-01-24 14:45:55 +00:00
|
|
|
# Make and install podman
|
2017-11-03 19:37:22 +00:00
|
|
|
make TAGS="${TAGS}"
|
2018-01-24 14:45:55 +00:00
|
|
|
make TAGS="${TAGS}" install PREFIX=/usr ETCDIR=/etc
|
2017-11-03 19:37:22 +00:00
|
|
|
make TAGS="${TAGS}" test-binaries
|
2018-01-16 18:10:18 +00:00
|
|
|
|
2018-01-24 14:45:55 +00:00
|
|
|
# Run the ginkgo integration tests
|
2018-02-08 16:40:43 +00:00
|
|
|
GOPATH=/go make localintegration
|
2018-01-24 14:45:55 +00:00
|
|
|
exit 0
|