Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor polish to the planemo travis_init command #512

Merged
merged 2 commits into from Jul 19, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 16 additions & 5 deletions planemo/commands/cmd_travis_init.py
Expand Up @@ -11,10 +11,14 @@

PREPARE_MESSAGE = (
"Place commands to prepare an Ubuntu VM for use with your tool(s) "
"in the .travis/setup_custom_dependencies.bash shell script. Be sure to "
"add these new files to your git repository with 'git add .travis "
".travis.yml' and then commit. You will also need to register your github "
"tool project with Travi CI by visiting https://travis-ci.org/."
"in the .travis/setup_custom_dependencies.bash shell script, which "
"will be executed on Travis CI via 'planemo travis_before_install'.\n"
"\n"
"Be sure to add these new files to your git repository with "
"'git add .travis .travis.yml' and then commit.\n"
"\n"
"You will also need to register your github tool project with "
"Travis CI by visiting https://travis-ci.org/."
)

TRAVIS_TEST_SCRIPT_URL = RAW_CONTENT_URL + "scripts/travis_test.sh"
Expand All @@ -36,6 +40,11 @@
- wget -O- %s | /bin/bash -x
""" % TRAVIS_TEST_SCRIPT_URL

TRAVIS_SETUP = """#!/bin/bash
# This will be run on TravisCI via 'planemo travis_before_install' in .travis.yml
#
# TODO: Add your instructions here:
"""

@click.command('travis_init')
@options.optional_project_arg()
Expand Down Expand Up @@ -67,5 +76,7 @@ def cli(ctx, path):
else:
warn(".travis.yml file already exists, not overwriting.")
if not os.path.exists(setup_sh):
open(setup_sh, "w").write("#!/bin/bash\n")
open(setup_sh, "w").write(TRAVIS_SETUP)
else:
warning(".travis/setup_custom_dependencies.bash already exists, not overwriting.")
info(PREPARE_MESSAGE)