Skip to content

Commit

Permalink
Add support for ip ranges (#67)
Browse files Browse the repository at this point in the history
* Add support for ip ranges

* update installation for mac

* Update version to support mac

* fix lint

* Add debug

* Fix link for mac
  • Loading branch information
marboledacci authored Jan 13, 2025
1 parent 16942bc commit 13c7c9a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ executors:
mac:
macos:
xcode: "13.4.1"
shell: bash --login -eox pipefail
arm:
machine:
image: ubuntu-2204:current
Expand Down
6 changes: 4 additions & 2 deletions src/commands/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ description: >
parameters:
version:
description: Select the tagged release version of Shellcheck to install.
default: "0.7.1"
description: |
Select the tagged release version of Shellcheck to install.
Mac with ARM arquitecture is only supported since version 0.10.0
default: "0.10.0"
type: string

steps:
Expand Down
1 change: 0 additions & 1 deletion src/examples/add_shellcheck_to_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ usage:
- shellcheck/check:
dir: ./myScripts
exclude: "SC2148"

1 change: 0 additions & 1 deletion src/examples/custom_shellcheck_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ usage:
my_workflow:
jobs:
- my_job

6 changes: 6 additions & 0 deletions src/jobs/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ parameters:
type: string
default: ""
description: The file pattern to search for. By default will search for "*.sh"
circleci_ip_ranges:
description: Enables jobs to go through a set of well-defined IP address ranges.
type: boolean
default: false

circleci_ip_ranges: << parameters.circleci_ip_ranges >>

steps:
- checkout
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ if [[ $EUID == 0 ]]; then export SUDO=""; else # Check if we're root
fi

install_mac() {
curl -LJO "https://github.com/koalaman/shellcheck/releases/download/v${SC_INSTALL_VERSION}/shellcheck-v${SC_INSTALL_VERSION}.darwin.x86_64.tar.xz"
tar -xvf "shellcheck-v$SC_INSTALL_VERSION.darwin.x86_64.tar.xz"
curl -LJO "https://github.com/koalaman/shellcheck/releases/download/v${SC_INSTALL_VERSION}/shellcheck-v${SC_INSTALL_VERSION}.darwin.aarch64.tar.xz"
tar -xvf "shellcheck-v$SC_INSTALL_VERSION.darwin.aarch64.tar.xz"
cd "shellcheck-v$SC_INSTALL_VERSION/" || false
$SUDO cp shellcheck /usr/local/bin
}
Expand Down

0 comments on commit 13c7c9a

Please sign in to comment.