Skip to content

Commit

Permalink
Adding a script to build project on teamcity
Browse files Browse the repository at this point in the history
  • Loading branch information
cmorent authored and cmorent committed Dec 28, 2016
1 parent edc2187 commit 692db04
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions teamcity_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

wrapper=
for file in "/usr/share/virtualenvwrapper/virtualenvwrapper.sh" "/usr/local/bin/virtualenvwrapper.sh"
do
echo -n "Does \`${file}' exists ? "
[ -f "${file}" ] && { wrapper="$file" ; echo "yes" ; } || { echo "no" ; }
[ -n "${wrapper}" ] && break
done
[ -z "${wrapper}" ] && { echo "Please install virtualenvwrapper" 1>&2 ; exit 1 ; }

export WORKON_HOME="/home/teamcity/.virtualenvs"
source "${wrapper}"
workon teamcity 2> /dev/null
if [ "0" != "$?" ]
then
echo "Please setup a virtualenv named \`teamcity' for this test-runner."
exit 1
fi

pip install --upgrade -r requirements.txt

/bin/bash runtests.sh

0 comments on commit 692db04

Please sign in to comment.