From 736734c0653bcac354fc713e3e5c4a7aa1729b73 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Tue, 5 Mar 2019 13:59:10 +0100 Subject: [PATCH] Fetch more of the repository history for non clang-format builds. (#8788) By default, Travis fetches a shallow copy of the repository with up to 50 commits, leading `git describe` to not find any tag to offset against. This commit explicitly adds a refspec to fetch tags from, and then instructs Travis to fetch the relevant commits. --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 836803ab1e..c47578c7df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,11 @@ before_install: - if [[ $TRAVIS_OS_NAME == "linux" ]]; then bash scripts/linux/install.sh; export OPENRCT_MAKE_OPTS="-k 10 all openrct2-cli" ; fi - if [[ $TRAVIS_OS_NAME == "osx" ]]; then sudo gem install xcpretty-travis-formatter; fi +install: + - if [[ $TRAVIS_JOB_NAME != "clang-format" ]]; then git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*; fi + - if [[ $TRAVIS_JOB_NAME != "clang-format" ]]; then git config remote.origin.fetch +refs/tags/*:refs/tags/*; fi + - if [[ $TRAVIS_JOB_NAME != "clang-format" ]]; then git fetch --tags; fi + sudo: required dist: trusty env: