Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add code coverage #34

Merged
merged 3 commits into from
Mar 6, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: source env when available
  • Loading branch information
edeckers committed Mar 6, 2022
commit d4b1f38471c50d329c99a36092d45dbd3935dfae
4 changes: 3 additions & 1 deletion src/bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ function install_git_hooks () {

function install_poetry () {
if [ -z ${POETRY} ]; then
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python

try_source_env
fi
}

Expand Down
15 changes: 11 additions & 4 deletions src/bin/shared.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/usr/bin/env bash

INSTALL_STAMP_PATH='.install.stamp'
INSTALL_STAMP_PATH=".install.stamp"
POETRY_ENV_PATH="${HOME}/.poetry/env"

function poetry_path () {
if [ -z ${POETRY} ]; then
source $HOME/.poetry/env
function try_source_env () {
if [ -f ${POETRY_ENV_PATH} ]; then
source ${POETRY_ENV_PATH}
fi
}

function poetry_path () {
try_source_env

echo `command -v poetry 2> /dev/null`
}
Expand All @@ -18,3 +23,5 @@ function p () {
assert_poetry_exists
`poetry_path` ${@}
}

try_source_env
1 change: 1 addition & 0 deletions src/bin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ cd_to_source_directory
source bin/shared.sh

run_tests