Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
29 lines (22 sloc)
782 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Example non-Linux platforms for rhub: | |
# "macos-elcapitan-release" | |
# "windows-x86_64-devel" | |
set -e | |
dir_script=$(dirname $(readlink -f "$0")) | |
dir_root=$dir_script/../ | |
dir_package=$(basename $(dirname $dir_script)) | |
image_name=index.docker.io/jozefhajnala/rhub:latest | |
container_name=${dir_package}_check | |
docker login --username jozefhajnala --password $DOCKER_LOGIN_TOKEN | |
docker pull $image_name | |
docker run -id --name $container_name $image_name bash | |
docker cp $dir_root $container_name:/root | |
docker exec \ | |
--workdir /root/$dir_package \ | |
--env LANGSERVERSETUP_RUN_DEPLOY=$LANGSERVERSETUP_RUN_DEPLOY \ | |
--env LANGSERVERSETUP_TOKEN_CODECOV=$LANGSERVERSETUP_TOKEN_CODECOV \ | |
$container_name \ | |
Rscript "$@" | |
docker stop $container_name | |
docker rm $container_name |