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

Move bash scripts to sh #124

Merged
merged 1 commit into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ jobs:
- name: Install dependencies
if: env.CI_SKIP == 'false'
run: |
bash ./list-npx-cache.bash
bash ./list-npx-cache.sh
npm ci
bash ./list-npx-cache.bash
bash ./list-npx-cache.sh

- name: Lint
if: env.CI_SKIP == 'false'
Expand Down
4 changes: 2 additions & 2 deletions list-npx-cache.bash → list-npx-cache.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash
#!/bin/sh

# NOTE: THere is a discrepancy in the npx cache in npm between 8.4.1 and 8.1.4.
# There is an additional zx found in the npx cache when compared to the local npx cache using 8.1.4.

NPX_CACHE_DIR="$(npm config get cache)/_npx"

if [[ -d $NPX_CACHE_DIR ]]; then
if [ -d "$NPX_CACHE_DIR" ]; then
FILES=$(find $NPX_CACHE_DIR -type f | grep -v 'node_modules' | grep -v 'package-lock.json')
# FILES=$(find $NPX_CACHE_DIR -type f | grep -v 'node_modules')

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"scripts": {
"build": "npm run clean && tsc",
"clean": "rm -rf .*cache *.log .swc/ coverage/ dist/ logs/",
"postinstall": "bash postinstall.bash",
"postinstall": "sh postinstall.sh",
"lint": "eslint src --ext .js,.ts",
"lint:build": "npm run lint -- --config .build.eslintrc.json",
"lint:commit": "npm x -y -- commitlint@latest --edit",
Expand Down
2 changes: 1 addition & 1 deletion postinstall.bash → postinstall.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/bin/sh

npx -y -- zx@latest ./postinstall.mjs