Skip to content

Commit

Permalink
try fixing transifex deployment (#130)
Browse files Browse the repository at this point in the history
transifex deployment should only happen on the master branch
(otherwise leads to failures in pull requests)
  • Loading branch information
ltalirz committed Aug 27, 2019
1 parent 5b4231c commit ea57a29
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ env:
- BUILD: docs
TARGET: latexpdf
- BUILD: pre-commit
- BUILD: transifex-upload

install:
- pip install --upgrade pip
Expand All @@ -39,14 +38,28 @@ script:
# -C docs: switch to docs/ directory
make -C docs pre-docs
make -C docs $TARGET
elif [ "$BUILD" == "transifex-upload" ]; then
TRANSIFEX_PROJECT_NAME="aiida-tutorials"
sphinx-build -b gettext -D gettext_compact=0 docs locale
tx init --no-interactive
sphinx-intl update-txconfig-resources --pot-dir locale --transifex-project-name ${TRANSIFEX_PROJECT_NAME}
sudo echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = '"$TRANSIFEX_USER"$'\npassword = '"$TRANSIFEX_PASSWORD"$'\n' > ~/.transifexrc
tx push -s
else
pre-commit install
pre-commit run --all-files || ( git status --short; git diff ; exit 1 )
fi
jobs:
include:
- stage: transifex_docs
if: branch = master
services: ignore
addons: skip
python: 3.6
before_install: skip
install: skip
before_script: skip
script: skip
env: ignore
after_success:
- >
TRANSIFEX_PROJECT_NAME="aiida-tutorials"
sphinx-build -b gettext -D gettext_compact=0 docs locale
tx init --no-interactive
sphinx-intl update-txconfig-resources --pot-dir locale --transifex-project-name ${TRANSIFEX_PROJECT_NAME}
sudo echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = '"$TRANSIFEX_USER"$'\npassword = '"$TRANSIFEX_PASSWORD"$'\n' > ~/.transifexrc
tx push -s

0 comments on commit ea57a29

Please sign in to comment.