-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from tegonal/install-shellspec
add install-shellspec.sh
- Loading branch information
Showing
6 changed files
with
84 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# run the install-shellcheck.sh in your github/gitlab workflow | ||
# for instance, assuming you fetched this file via gget and remote name is tegonal-scripts | ||
# then in a github workflow you would have | ||
|
||
jobs: | ||
steps: | ||
- name: install shellspec v0.28.1 | ||
run: ./lib/tegonal-scripts/src/ci/install-shellspec.sh | ||
# and most likely as well | ||
- name: run shellspec | ||
run: shellspec | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# __ __ | ||
# / /____ ___ ____ ___ ___ _/ / This script is provided to you by https://github.com/tegonal/scripts | ||
# / __/ -_) _ `/ _ \/ _ \/ _ `/ / It is licensed under Apache 2.0 | ||
# \__/\__/\_, /\___/_//_/\_,_/_/ Please report bugs and contribute back your improvements | ||
# /___/ | ||
# Version: v0.17.0-SNAPSHOT | ||
# | ||
####### Description ############# | ||
# | ||
# function which searches for *.sh files within defined paths (directories or a single *.sh) and | ||
# runs shellcheck on each file with predefined settings i.a. sets `-s bash` | ||
# | ||
####### Usage ################### | ||
# | ||
# # run the install-shellcheck.sh in your github/gitlab workflow | ||
# # for instance, assuming you fetched this file via gget and remote name is tegonal-scripts | ||
# # then in a github workflow you would have | ||
# | ||
# jobs: | ||
# steps: | ||
# - name: install shellspec v0.28.1 | ||
# run: ./lib/tegonal-scripts/src/ci/install-shellspec.sh | ||
# # and most likely as well | ||
# - name: run shellspec | ||
# run: shellspec | ||
# | ||
################################### | ||
set -euo pipefail | ||
shopt -s inherit_errexit | ||
unset CDPATH | ||
|
||
declare currentDir | ||
currentDir=$(pwd) | ||
tmpDir=$(mktemp -d -t download-shellspec-XXXXXXXXXX) | ||
cd "$tmpDir" | ||
echo "4cac73d958d1ca8c502f3aff1a3b3cfa46ab0062f81f1cc522b83b7b2b302175 shellspec" >shellspec.sha256 | ||
wget --no-verbose https://git.io/shellspec | ||
sha256sum -c shellspec.sha256 | ||
sh ./shellspec 0.28.1 -y | ||
cd "$currentDir" | ||
echo "shellspec version is:" | ||
shellspec --version |