Skip to content

Commit

Permalink
build against different ckan releleases
Browse files Browse the repository at this point in the history
  • Loading branch information
Zharktas committed Jul 9, 2018
1 parent 1cac05c commit 16998d3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
12 changes: 11 additions & 1 deletion .travis.yml
@@ -1,7 +1,17 @@
language: python
python:
- "2.7"
env: PGVERSION=9.1
env:
- CKANVERSION=master
- CKANVERSION=2.2
- CKANVERSION=2.3
- CKANVERSION=2.4
- CKANVERSION=2.5
- CKANVERSION=2.6
- CKANVERSION=2.7
services:
- redis-server
- postgresql
install:
- bash bin/travis-build.bash
- pip install coveralls
Expand Down
14 changes: 9 additions & 5 deletions bin/travis-build.bash
Expand Up @@ -5,17 +5,21 @@ echo "This is travis-build.bash..."

echo "Installing the packages that CKAN requires..."
sudo apt-get update -qq
sudo apt-get install postgresql-$PGVERSION solr-jetty libcommons-fileupload-java:amd64=1.2.2-1
sudo apt-get install solr-jetty libcommons-fileupload-java

echo "Installing CKAN and its Python dependencies..."
git clone https://github.com/ckan/ckan
cd ckan
#export latest_ckan_release_branch=`git branch --all | grep remotes/origin/release-v | sort -r | sed 's/remotes\/origin\///g' | head -n 1`
#export ckan_branch=release-v2.2-dgu
export ckan_branch=master
echo "CKAN branch: $ckan_branch"
git checkout $ckan_branch
echo "CKAN commit: "`git rev-parse HEAD`
if [ $CKANVERSION == 'master' ]
then
echo "CKAN version: master"
else
CKAN_TAG=$(git tag | grep ^ckan-$CKANVERSION | sort --version-sort | tail -n 1)
git checkout $CKAN_TAG
echo "CKAN version: ${CKAN_TAG#ckan-}"
fi
python setup.py develop
pip install -r requirements.txt --allow-all-external
pip install -r dev-requirements.txt --allow-all-external
Expand Down

0 comments on commit 16998d3

Please sign in to comment.