Last active
June 20, 2023 16:06
-
-
Save kingbuzzman/e534b6525e9fb6f1329384b0e381a3e2 to your computer and use it in GitHub Desktop.
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
| # Steps to running factory_boy quickly to make a PR. | |
| # 1. Fork factory_boy on github: https://github.com/FactoryBoy/factory_boy | |
| # 2. Make sure that you've setup your ssh keys for github: https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/ | |
| # IMPORTANT: *** Please ignore if you've already done it *** | |
| # 3. Copy and paste this directly into your terminal: | |
| docker run -v ${pwd}/factory_boy:/factory_boy -v ~/.ssh:/root/.ssh -v ~/.gitconfig:/root/.gitconfig -it --rm python:3.9 bash -c ' | |
| # update the machine | |
| apt-get update && \ | |
| # install dependencies | |
| apt-get install -y mongodb vim && \ | |
| # clone the repo if it doesnt exist | |
| (if [ ! -d /factory_boy/factory ]; then | |
| # dont be afaid of this, this just gets your github username and adds it into the clone url | |
| # this is here so there is no placeholder "git@github.com:<insert your username here>/factory_boy.git" | |
| # and anyone can just copy and paste it. also django is 250MB+ so we only get the last 50 commits to try and keep the size down. | |
| git clone --depth 50 git@github.com:`ssh -T git@github.com 2>&1 | cut -d " " -f 2 | rev | cut -c 2- | rev`/factory_boy.git | |
| fi) && \ | |
| # go into the code | |
| cd factory_boy && \ | |
| # add the remote "upstream" if it doesnt exist | |
| (if ! git config remote.upstream.url > /dev/null; then | |
| git remote add upstream https://github.com/FactoryBoy/factory_boy | |
| fi) && \ | |
| # setup mongo data | |
| mkdir -p /data/db && \ | |
| # install the code | |
| pip install -r requirements_dev.txt && \ | |
| # make a new line and add instructions for the user to follow | |
| echo && \ | |
| echo "Run: '"'"'mongod &'"'"' and then '"'"'make coverage'"'"'" && \ | |
| # give the user the prompt so they chose what they really want to do | |
| exec bash | |
| ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment