jkawamoto/loci

View on GitHub
assets/entrypoint-python

Summary

Maintainability
Test Coverage
#!/bin/bash
#
# entrypoint-python
#
# Copyright (c) 2016-2017 Junpei Kawamoto
#
# This software is released under the MIT License.
#
# http://opensource.org/licenses/mit-license.php
#

# Run before install steps, install steps, before script steps, and script
# steps in this order. This entry point script focuses on running tests for
# Python applications. If any parameters are given, execute the parameters
# instead. For example, to debug this script, run this with `bash` as the
# parameter and get a shell access.
{{define "env"}}
PATH="/root/.pyenv/bin:$PATH"
eval "$(pyenv init -)" && \
eval "$(pyenv virtualenv-init -)"
{{end}}

{{define "prepare"}}
TERM=xterm
readonly PYVERSION=$(pyenv local)
{{end}}

{{define "install"}}
echo -e "\e[33mInstall Steps:\e[m"
if [[ -e requirements.txt ]]; then
  pip install -r requirements.txt
fi
{{range .Install}}
echo "{{.}}"
({{.}})
{{end}}
{{end}}