Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Docs: Uploading DAP from GitHub with Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
hroncok committed Mar 17, 2015
1 parent 7b787ba commit b638111
Showing 1 changed file with 35 additions and 0 deletions.
Expand Up @@ -178,3 +178,38 @@ Once you provide the token, it is saved to ``devassistant.dapi.token`` git globa
If you ever want to unset it, just run::

$ git config --global --unset devassistant.dapi.token

Uploading from GitHub with Travis CI
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It is also possible to upload your DAPs directly from GitHub using
`Travis CI <https://travis-ci.org/>`_ . Unfortunately you cannot do it via the ``deploy``
statement, because DAPI is not yet supported there. But you can still do it with ``after_success``.
Here is an example ``.travis.yml`` that will upload your DAP to DAPI on tagged commits only::

language: python # Use python here so you can install DevAssistant easily
python:
- '3.4' # Just one version is required, 3.4 is the latest
install:
- pip install devassistant
- sudo apt-get install realpath # needed by the packing assistant
- da pkg install dap
script:
- da twk dap pack
- da pkg lint *.dap
# Upload to DAPI on tagged commits from owner/dap-foo
after_success:
- if [ -n "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] &&
[ "$TRAVIS_REPO_SLUG" == "owner/dap-foo" ] && [ -n "$DAPI_TOKEN" ]; then
git config --global devassistant.dapi.token $DAPI_TOKEN;
da extra dap upload -d *.dap;
fi
# This was generated by: travis encrypt DAPI_TOKEN=xxxxxxxxxxxxxxxxxxxx --add
env:
global:
secure: dCacnOhnVEckP7m9Mg8+0WyxH3c7mvQjgxQlhxivBEtbxs/t5RhRzwg8Divicq49QPM0mgQPP50fdBIt3XLJrmxq4VU4SWVqKDgo1m7LMrT2fuNs6kk5fqENojf+PFHmNgL0hnXciuY7ht9Az5f1bWL+A6+/rQu4SCCw35yvGnA=

If you need help with setting up Travis CI, continue to the
`Travis CI Documentation <http://docs.travis-ci.com/>`_.

0 comments on commit b638111

Please sign in to comment.