Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #605 from acsone/makepot-on-mergebot-branches
Browse files Browse the repository at this point in the history
Run makepot on merge bot branches too
  • Loading branch information
pedrobaeza committed Jun 17, 2019
2 parents 885426c + eb61da8 commit a261bb2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 22 deletions.
19 changes: 11 additions & 8 deletions travis/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,17 @@ def main(argv=None):
return 1
# no test error, let's generate .pot and msgmerge all .po files
must_run_makepot = (
os.environ.get('MAKEPOT') == '1' and
os.environ.get('TRAVIS_REPO_SLUG', '').startswith('OCA/') and
os.environ.get('TRAVIS_BRANCH')
in ('8.0', '9.0', '10.0', '11.0', '12.0') and
os.environ.get('TRAVIS_PULL_REQUEST') == 'false' and
os.environ.get('GITHUB_USER') and
os.environ.get('GITHUB_EMAIL') and
os.environ.get('GITHUB_TOKEN')
os.environ.get('MAKEPOT') == '1'
and os.environ.get('TRAVIS_REPO_SLUG', '').startswith('OCA/')
and (
os.environ.get('TRAVIS_BRANCH')
in ('8.0', '9.0', '10.0', '11.0', '12.0')
or "ocabot-merge" in os.environ.get('TRAVIS_BRANCH')
)
and os.environ.get('TRAVIS_PULL_REQUEST') == 'false'
and os.environ.get('GITHUB_USER')
and os.environ.get('GITHUB_EMAIL')
and os.environ.get('GITHUB_TOKEN')
)
if must_run_makepot:
# run makepot using the database we just tested
Expand Down
33 changes: 19 additions & 14 deletions travis/travis_run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,26 @@ if __name__ == '__main__':

# TRAVIS_PULL_REQUEST contains the pull request number or 'false'
is_pull_request = os.environ.get('TRAVIS_PULL_REQUEST') != 'false'
# run makepot using a fresh database
# where addons are going to be installed
# is MAKEPOT=1 and TESTS=1, test_server.py will run
# makepot using the test database, which will be faster
# Run makepot using a fresh database
# where addons are going to be installed.
# If MAKEPOT=1 and TESTS=1, test_server.py will run
# makepot using the test database, which will be faster.
must_run_makepot = (
(os.environ.get('MAKEPOT') == '1' or
os.environ.get('TRANSIFEX') == '1') and
not tests_enabled and
is_oca_project and
os.environ.get('TRAVIS_BRANCH')
in ('8.0', '9.0', '10.0', '11.0', '12.0') and
not is_pull_request and
os.environ.get('GITHUB_USER') and
os.environ.get('GITHUB_EMAIL') and
os.environ.get('GITHUB_TOKEN')
(
os.environ.get('MAKEPOT') == '1'
or os.environ.get('TRANSIFEX') == '1'
)
and not tests_enabled
and is_oca_project
and (
os.environ.get('TRAVIS_BRANCH')
in ('8.0', '9.0', '10.0', '11.0', '12.0')
or "ocabot-merge" in os.environ.get('TRAVIS_BRANCH')
)
and not is_pull_request
and os.environ.get('GITHUB_USER')
and os.environ.get('GITHUB_EMAIL')
and os.environ.get('GITHUB_TOKEN')
)

# Test list. Each test is a list with command + arguments.
Expand Down

0 comments on commit a261bb2

Please sign in to comment.