Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/caarlos0-graveyard/shell-ci-build
A submodule to lint your shell projects with shellcheck in travis.ci builds
https://github.com/caarlos0-graveyard/shell-ci-build
lint shell shellcheck travis
Last synced: 3 months ago
JSON representation
A submodule to lint your shell projects with shellcheck in travis.ci builds
- Host: GitHub
- URL: https://github.com/caarlos0-graveyard/shell-ci-build
- Owner: caarlos0-graveyard
- License: mit
- Created: 2014-12-28T02:49:17.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-08-28T02:20:41.000Z (about 7 years ago)
- Last Synced: 2024-05-15T14:03:18.799Z (6 months ago)
- Topics: lint, shell, shellcheck, travis
- Language: Shell
- Homepage:
- Size: 36.1 KB
- Stars: 39
- Watchers: 2
- Forks: 19
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
shell-ci-build [![Build Status](https://travis-ci.org/caarlos0/shell-ci-build.svg?branch=master)](https://travis-ci.org/caarlos0/shell-ci-build) [![SayThanks.io](https://img.shields.io/badge/SayThanks.io-%E2%98%BC-1EAEDB.svg?style=flat-square)](https://saythanks.io/to/caarlos0)
==================A submodule to lint your shell projects with shellcheck in travis.ci builds.
## Build
- The `install.sh` script will install shellckeck.
- The `build.sh` will lint all executable files with shellcheck, avoiding
Ruby, compdef and the like files. It will also ignore all files inside `.git`
directory and files of your `gitmodules`, if any.## Usage
```sh
git submodule add https://github.com/caarlos0/shell-ci-build.git build
cp build/travis.yml.example .travis.yml
```Or tweak your `.travis.yml` to be like this:
```yml
language: bash
install:
- ./build/install.sh
script:
- ./build/build.sh
```## Customizing
You might want to lint other files, to do that, you need your own
`build.sh` and a slight change in `.travis.yml` file.Example (from my [dotfiles](https://github.com/caarlos0/dotfiles)):
```sh
#!/usr/bin/env bash
set -eo pipefail
source ./build/build.sh
check "./zsh/zshrc.symlink"
``````yml
language: bash
install:
- ./build/install.sh
script:
- ./build.sh
notifications:
email: false
```This will make travis ran the `build.sh` from this project first,
then, lint your custom files.You can also override the `find_cmd` function, which returns a string
containing the `find` command to `eval`. Check the source or open an
issue if you have any problems.## Updating
Update your projects is easy. Just run this:
```sh
git submodule update --remote --merge && \
git commit -am 'updated shell-ci-build version' && \
git push
```