mirror of
https://github.com/ru-de/faq.git
synced 2024-11-22 10:22:20 +00:00
cd19c0a6eb
* Update dictionary.dic * Added secret token * Update .travis.yml * Update .travis.yml * Moved shell scripts to .travis, added sort & push.sh on success * Travis build: 4 * Fixed dir issue * Excluded build-related files * Sort if changed only * Travis build: 7 * Travis build: 9 * Set locale * Moved back travis scripts * Fixed travis * Changed files dir back * Reorganized travisci * Added git clone depth and skipping submodules * Extracted run_on_master.sh * Fixed cs
29 lines
733 B
Bash
29 lines
733 B
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
skip() {
|
|
echo "$@" 1>&2
|
|
echo "Exiting..." 1>&2
|
|
exit 0
|
|
}
|
|
|
|
[ "${TRAVIS_PULL_REQUEST}" = "false" ] || \
|
|
skip "Not running master-only script for pull-requests."
|
|
|
|
[ "${TRAVIS_BRANCH}" = "master" ] || \
|
|
skip "Running master-only for updates on 'master' branch (current: ${TRAVIS_BRANCH})."
|
|
|
|
[ "${TRAVIS_REPO_SLUG}" = "ru-de/faq" ] || \
|
|
skip "Running master-only for updater on main repo (current: ${TRAVIS_REPO_SLUG})."
|
|
|
|
[ "${GH_TOKEN+set}" = set ] || \
|
|
skip "GitHub access token not available, skipping dict check."
|
|
|
|
dict_check() {
|
|
LC_ALL=ru_RU.UTF8 sort files/dictionary.dic -C || \
|
|
(LC_ALL=ru_RU.UTF8 sort files/dictionary.dic -o files/dictionary.dic -f && sh files/push.sh)
|
|
}
|
|
|
|
dict_check
|