This repository has been archived by the owner on Nov 29, 2022. It is now read-only.
forked from OCA/maintainer-quality-tools
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from vauxoo-dev/master-vx-merge-oca-moy
Get transifex commits from oca/master
- Loading branch information
Showing
5 changed files
with
78 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,9 +55,15 @@ if __name__ == '__main__': | |
tests_enabled = os.environ.get('TESTS') == '1' | ||
tests_unspecified = os.environ.get('TESTS') is None | ||
transifex_enabled = os.environ.get('TRANSIFEX') == '1' | ||
is_oca_project = os.environ.get('TRAVIS_REPO_SLUG', '').startswith('OCA/') | ||
is_oca_transifex_user = os.environ.get('TRANSIFEX_USER') == \ | ||
'[email protected]' | ||
|
||
# TRAVIS_PULL_REQUEST contains the pull request number or 'false' | ||
is_pull_request = os.environ.get('TRAVIS_PULL_REQUEST') != 'false' | ||
# Avoid false red from forks using OCA transifex user | ||
is_valid_transifex = not is_pull_request and \ | ||
is_oca_project == is_oca_transifex_user | ||
|
||
# Test list. Each test is a list with command + arguments. | ||
tests = [] | ||
|
@@ -75,7 +81,7 @@ if __name__ == '__main__': | |
elif tests_enabled: | ||
tests.append(['test_server.py']) | ||
|
||
if transifex_enabled and not is_pull_request: | ||
if transifex_enabled and is_valid_transifex: | ||
tests.append(['travis_transifex.py']) | ||
|
||
if tests: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters