Skip to content

Commit

Permalink
.ci: Modify shell scripts to two space indents
Browse files Browse the repository at this point in the history
Give coala's shell scripts a standard.
Modify .sh files using `shfmt -i 2 -ci`
from https://github.com/mvdan/sh#shfmt.
This changes shell scripts according to
Google's guide.

Closes #2320
  • Loading branch information
sangamcse committed Mar 28, 2018
1 parent 77d9829 commit 870f058
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .ci/check_maintainership.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ source ../rultor_secrets.sh

# Make sure the user is a maintainer
if curl "https://api.github.com/teams/1238757/memberships/${author}?access_token=${GITHUB_TOKEN}" | grep -q "Not Found"; then
echo "@${author} is not in the maintainers group."
exit 1
echo "@${author} is not in the maintainers group."
exit 1
fi
4 changes: 2 additions & 2 deletions .ci/deps.apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ case $CIRCLE_BUILD_IMAGE in
# Use xenial, needed to replace outdated julia provided by Circle CI
ADD_APT_UBUNTU_RELEASE=xenial
# Work around lack of systemd on trusty, which xenial's lxc-common expects
echo '#!/bin/sh' | sudo tee /usr/bin/systemd-detect-virt > /dev/null
echo '#!/bin/sh' | sudo tee /usr/bin/systemd-detect-virt >/dev/null
sudo chmod a+x /usr/bin/systemd-detect-virt

# The non-apt go provided by Circle CI is acceptable
Expand All @@ -41,7 +41,7 @@ case $CIRCLE_BUILD_IMAGE in
esac

if [ -n "$ADD_APT_UBUNTU_RELEASE" ]; then
echo "deb http://archive.ubuntu.com/ubuntu/ $ADD_APT_UBUNTU_RELEASE main universe" | sudo tee -a /etc/apt/sources.list.d/$ADD_APT_UBUNTU_RELEASE.list > /dev/null
echo "deb http://archive.ubuntu.com/ubuntu/ $ADD_APT_UBUNTU_RELEASE main universe" | sudo tee -a /etc/apt/sources.list.d/$ADD_APT_UBUNTU_RELEASE.list >/dev/null
fi

if [ "$USE_PPAS" = "true" ]; then
Expand Down
2 changes: 1 addition & 1 deletion .ci/deps.coala-bears.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -x
set -e

# making coala cache the dependencies downloaded upon first run
echo '' > /tmp/dummy
echo '' >/tmp/dummy

coala --ci -V --bears CheckstyleBear,ScalaLintBear --files /tmp/dummy --no-config --bear-dirs bears

Expand Down
10 changes: 5 additions & 5 deletions .ci/deps.pip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ TERM=dumb

# Choose the python versions to install deps for
case $CIRCLE_NODE_INDEX in
0) dep_versions=( "3.4.3" "3.5.1" ) ;;
1) dep_versions=( "3.4.3" ) ;;
-1) dep_versions=( ) ;; # set by .travis.yml
*) dep_versions=( "3.5.1" ) ;;
0) dep_versions=("3.4.3" "3.5.1") ;;
1) dep_versions=("3.4.3") ;;
-1) dep_versions=() ;; # set by .travis.yml
*) dep_versions=("3.5.1") ;;
esac

for dep_version in "${dep_versions[@]}" ; do
for dep_version in "${dep_versions[@]}"; do
pyenv install -ks $dep_version
pyenv local $dep_version 2.7.10
python --version
Expand Down
4 changes: 2 additions & 2 deletions .ci/deps.r.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set -e
set -x

# R commands
echo '.libPaths( c( "'"$R_LIB_USER"'", .libPaths()) )' >> .Rprofile
echo 'options(repos=structure(c(CRAN="http://cran.rstudio.com")))' >> .Rprofile
echo '.libPaths( c( "'"$R_LIB_USER"'", .libPaths()) )' >>.Rprofile
echo 'options(repos=structure(c(CRAN="http://cran.rstudio.com")))' >>.Rprofile
R -q -e 'install.packages("lintr")'
R -q -e 'install.packages("formatR")'
2 changes: 1 addition & 1 deletion .ci/deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ go get -u github.com/BurntSushi/toml/cmd/tomlv
bundle install --path=vendor/bundle --binstubs=vendor/bin --jobs=8 --retry=3

# Dart Lint commands
if ! dartanalyzer -v &> /dev/null ; then
if ! dartanalyzer -v &>/dev/null; then
wget -nc -O ~/dart-sdk.zip https://storage.googleapis.com/dart-archive/channels/stable/release/1.14.2/sdk/dartsdk-linux-x64-release.zip
unzip -n ~/dart-sdk.zip -d ~/
fi
Expand Down
10 changes: 5 additions & 5 deletions .ci/env_variables.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export python_virtualenv=`pyenv prefix`
export python_implementation=`python -c "import platform; print(platform.python_implementation())"`
export python_version=`python -c "import sys; print(str(sys.version_info.major)+'.'+str(sys.version_info.minor))"`
export python_virtualenv=$(pyenv prefix)
export python_implementation=$(python -c "import platform; print(platform.python_implementation())")
export python_version=$(python -c "import sys; print(str(sys.version_info.major)+'.'+str(sys.version_info.minor))")

if [ "$(uname)" == "Darwin" ] ; then
if [ "$(uname)" == "Darwin" ]; then
export system_os="OSX"
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ] ; then
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
export system_os="LINUX"
fi
2 changes: 1 addition & 1 deletion .ci/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source .ci/env_variables.sh

args=()

if [ "$system_os" == "LINUX" ] ; then
if [ "$system_os" == "LINUX" ]; then
args+=('--cov' '--cov-fail-under=100' '--doctest-modules')
fi

Expand Down

0 comments on commit 870f058

Please sign in to comment.