Created
January 26, 2017 02:49
-
-
Save focusaurus/0cb0290d65335ed240445a00dc6fbd63 to your computer and use it in GitHub Desktop.
Build script detects macOS and runs itself under docker
This file contains hidden or 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
#!/usr/bin/env bash | |
cd "$(dirname "$0")/.." | |
if [[ "$(uname)" == "Darwin" ]]; then | |
docker build --tag foo-rpmbuild . | |
docker run --interactive --tty --rm \ | |
--volume "${PWD}:/opt/docker-host" \ | |
--volume "$(yarn cache dir | grep '^/'):/var/run/yarn-cache" \ | |
foo-rpmbuild /opt/docker-host/bin/build.sh | |
exit | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment