summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-11-22 18:29:38 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-12-18 21:39:00 +0100
commit6ee2f75a75b31fc8c65e55e33778486b844e3166 (patch)
tree3ca86e724d554cc4ae5e2ce25e1cb642ebb803b7
parent56aa17c5a7c574f5aa360b4840a2ffc08395b8b2 (diff)
downloadbundler-6ee2f75a75b31fc8c65e55e33778486b844e3166.tar.gz
Do extra root setup only when needed
Regular builds shouldn't need any extra configuration deviating from a standard ubuntu setup.
-rw-r--r--.travis.yml11
-rw-r--r--Rakefile14
2 files changed, 10 insertions, 15 deletions
diff --git a/.travis.yml b/.travis.yml
index e7828fd4af..3f0ed68fdd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,8 +4,17 @@ script: bin/rake spec:travis
before_script:
- travis_retry gem install rake:"~> 12.0"
- travis_retry bin/rake override_version
- - travis_retry bin/rake spec:travis:deps
+ - travis_retry bin/rake spec:deps
- bin/rake man:check
+ - if [ "$BUNDLER_SPEC_SUB_VERSION" = "" ];
+ then
+ sudo apt-get install graphviz -y;
+ fi
+ - if [ "$TRAVIS_RUBY_VERSION" = "2.3.8" ];
+ then
+ sudo sed -i 's/1000::/1000:Travis:/g' /etc/passwd;
+ sudo sed -i '/secure_path/d' /etc/sudoers;
+ fi
branches:
only:
diff --git a/Rakefile b/Rakefile
index 8cd6def9f1..2243da21c5 100644
--- a/Rakefile
+++ b/Rakefile
@@ -36,20 +36,6 @@ namespace :spec do
Spec::Rubygems.dev_setup
end
- namespace :travis do
- task :deps do
- # Give the travis user a name so that git won't fatally error
- system "sudo sed -i 's/1000::/1000:Travis:/g' /etc/passwd"
- # Strip secure_path so that RVM paths transmit through sudo -E
- system "sudo sed -i '/secure_path/d' /etc/sudoers"
- # Install graphviz so that the viz specs can run
- sh "sudo apt-get install graphviz -y"
-
- # Install the other gem deps, etc
- Rake::Task["spec:deps"].invoke
- end
- end
-
task :clean do
rm_rf "tmp"
end