diff --git a/.travis.yml b/.travis.yml index 470558f..462e370 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,20 @@ language: python python: - - "2.6" - - "2.7" - # Not quite ready for prime time... - - "3.2" - - "3.3" - - "3.4" - - "3.5" - - "pypy" -# command to install dependencies +- '2.6' +- '2.7' +- '3.2' +- '3.3' +- '3.4' +- '3.5' +- pypy install: - - pip install coveralls - # Need to do this since coverage is broken in travis https://github.com/travis-ci/travis-ci/issues/4866 - - pip install 'coverage<4' -# command to run tests +- pip install coveralls +- pip install 'coverage<4' script: nosetests --with-coverage --cover-package=voluptuous after_success: - - coveralls - - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./update_documentation.sh; fi' \ No newline at end of file +- coveralls +- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./update_documentation.sh $USERNAME $PASSWORD; fi +env: + global: + - secure: UKVFCaFRRECYeNaLJr4POqt6zENBjyUe79U/5b9pEGBFWzXWoJ+EElOFOJdkquL6u3AwL6Bw93GqRIYHKcRW70doCYiEI7p2CuXey2mjoC7bLKdk4Fcrj0MTbiS6WJxEDfcsP/Tj3tv4kPqA4nYYm9DQoNfUX3skns442h0zals= + - secure: EK2dbVB4T7qNFWCSu3tL+l2YnpcrCvPk9E3W05rGZnkT38Do21kVDncf8XRh/5Nn4J6zGmdoHw6NFqeQtF6/+3GNIqEW4PzA5x5pUx1rI6drB0hTaEURG3VYUmLOoQ/thziaEmnez8Qt1hUtn/0Jhl6eUYOtmSTSkDeLz7zehm0= diff --git a/update_documentation.sh b/update_documentation.sh index d27b5b8..6ea9810 100644 --- a/update_documentation.sh +++ b/update_documentation.sh @@ -1,5 +1,49 @@ #!/usr/bin/env bash -git checkout gh-pages -git merge master + +# Merge pushes to development branch to stable branch +if [ ! -n $2 ] ; then + echo "Usage: merge.sh " + exit 1; +fi + +GIT_USER="$1" +GIT_PASS="$2" + +# Specify the development branch and stable branch names +FROM_BRANCH="master" +TO_BRANCH="gh-pages" + +# Get the current branch +export PAGER=cat +CURRENT_BRANCH=$(git log -n 1 --pretty=%d HEAD | cut -d"," -f3 | cut -d" " -f2 | cut -d")" -f1) +echo "current branch is '$CURRENT_BRANCH'" + +# Create the URL to push merge to +URL=$(git remote -v | head -n1 | cut -f2 | cut -d" " -f1) +echo "Repo url is $URL" +PUSH_URL="https://$GIT_USER:$GIT_PASS@${URL:6}" + +if [ "$CURRENT_BRANCH" = "$FROM_BRANCH" ] ; then + # Checkout the dev branch + #git checkout $FROM_BRANCH && \ + #echo "Checking out $TO_BRANCH..." && \ + + # Checkout the latest stable + git fetch origin ${TO_BRANCH}:${TO_BRANCH} && \ + git checkout ${TO_BRANCH} && \ + + # Merge the dev into latest stable + echo "Merging changes..." && \ + git merge ${FROM_BRANCH} && \ + + # Push changes back to remote vcs + echo "Pushing changes..." && \ + git push ${PUSH_URL} && \ + echo "Merge complete!" || \ + echo "Error Occurred. Merge failed" +else + echo "Not on $FROM_BRANCH. Skipping merge" +fi + pip install -r requirements.txt -sphinx-apidoc -o docs -f voluptuous \ No newline at end of file +sphinx-apidoc -o docs -f voluptuous