Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update travis to download shellcheck binary #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 32 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
language: sh
os: linux
dist: trusty
language: bash

before_script:
- sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty-backports restricted main universe"
- sudo apt-get update -qq
- sudo apt-get install -qq shellcheck
env:
global:
# or "v0.4.7", or "stable"
- SCVERSION="latest"

addons:
apt:
update: true
packages:
- xz-utils

before_install:
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
sctmp="$( mktemp -d -p ${TMPDIR:-/tmp} shellcheck.XXXXX)"
pushd "${sctmp}" > /dev/null
curl -k -sSLO "https://storage.googleapis.com/shellcheck/shellcheck-${SCVERSION?}.linux.x86_64.tar.xz"
curl -k -sSLO "https://storage.googleapis.com/shellcheck/shellcheck-${SCVERSION?}.linux.x86_64.tar.xz.sha512sum"
if sha512sum -c --quiet "shellcheck-${SCVERSION?}.linux.x86_64.tar.xz.sha512sum"; then
tar -x --xz -f "shellcheck-${SCVERSION?}.linux.x86_64.tar.xz"
sudo install -v -m0755 "${sctmp}/shellcheck-${SCVERSION}/shellcheck" "$( command -v shellcheck)"
grep 'binary was compiled' "${sctmp}/shellcheck-${SCVERSION}/README.txt"
shellcheck --help
fi
popd > /dev/null
fi

git:
depth: 3

script:
- shellcheck --shell=bash aws-export-profile