Last active
April 5, 2017 23:00
-
-
Save dropwhile/e6d2533cd5ba6b1c4d67e4d756fb2bd7 to your computer and use it in GitHub Desktop.
some examples of helper scripts I use: all files go in an ./env dir inside the project (git ignores them due to gitignore match). then you call them like ./env/run.sh
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/bash | |
source .tox/py27/bin/activate | |
source env/env.sh | |
alembic "$@" |
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
BREW_PREFIX="$(brew --prefix)" | |
export CFLAGS="-I${BREW_PREFIX}/include -L${BREW_PREFIX}}/lib" | |
export ARCHFLAGS="-arch x86_64" | |
export PYTHONDONTWRITEBYTECODE=1 | |
export PYTHONPATH="${PWD}:${PYTHONPATH}" | |
export PYTHONHASHSEED=100 | |
export APP_DB_DSN="mysql://root:[email protected]/tabbedout?charset=utf8mb4" | |
export APP_BI_URL="http://127.0.0.1:81" | |
export APP_DB_DEBUG="true" | |
export APP_DEBUG="true" | |
export APP_SG_DSN="172.16.100.205:4984/db/" | |
export APP_SG_ADMIN_DSN="http://172.16.100.205:4985/db/" | |
export APP_COUCHBASE_DSN="couchbase://172.16.100.205/default" | |
export APP_REDIS_DSN="redis://172.16.100.205:6379/0" | |
export APP_HMAC_KEY="tests" | |
export APP_S3_BUCKET="testing-bucket" | |
export APP_AWS_ENDPOINT="http://172.16.100.205:9000" | |
export APP_AWS_SECRET_KEY="testing" | |
export APP_AWS_ACCESS_KEY="testing" | |
export APP_ENVIRONMENT="dev" |
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/bash | |
source .tox/py27/bin/activate | |
source env/env.sh | |
make interactive |
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/bash | |
source .tox/py27/bin/activate | |
source env/env.sh | |
make migrate |
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/bash | |
source .tox/py27/bin/activate | |
source env/env.sh | |
export APP_HMAC_KEY="some-hmac-key" | |
export APP_ENVIRONMENT="dev-elij" | |
make devrun |
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/bash | |
source .tox/py27/bin/activate | |
source env/env.sh | |
# override db to test db. run w/ debug | |
export APP_DB_DSN="mysql://root:[email protected]/tabbedout_test?charset=utf8mb4" | |
export APP_DB_DEBUG="true" | |
make migrate |
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/bash | |
source .tox/py27/bin/activate | |
source env/env.sh | |
# override db to test db. | |
export APP_DB_DSN="mysql://root:[email protected]/tabbedout_test?charset=utf8mb4" | |
py.test --no-cov "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment