Skip to content

Commit

Permalink
Merge pull request #92 from rainstormy/spdiswal/skip-major-nodejs-upg…
Browse files Browse the repository at this point in the history
…rades
  • Loading branch information
spdiswal authored Jan 6, 2025
2 parents 673e0b5 + de72e50 commit 23b82b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 79 deletions.
5 changes: 4 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>rainstormy/presets-renovate"],
"extends": [
"github>rainstormy/presets-renovate",
"github>rainstormy/presets-renovate:skip-nodejs-major"
],
"schedule": [
"after 5pm every weekday",
"before 7am every weekday",
Expand Down
84 changes: 6 additions & 78 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,6 @@
# Define Git hooks.
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md

pre-commit:
commands:
pnpm-fmt:
run: pnpm fmt
stage_fixed: true
skip:
- merge
- rebase

pre-push:
parallel: true
commands:
pnpm-check:
run: pnpm check
pnpm-test:
run: pnpm test

post-checkout:
piped: true
commands:
nvm-install-on-nvmrc-change:
# language=sh
run: |
# Check if any changes occurred to `.nvmrc` upon the checkout (between the HEAD@{1} and HEAD revisions).
NVMRC_CHANGED=$(git diff --name-only HEAD@{1} HEAD -- | grep '.nvmrc')
if [ ! -z "$NVMRC_CHANGED" ]; then
echo "Changes detected in '.nvmrc' upon the checkout. Running 'nvm install'."
nvm install
else
echo "No changes detected in '.nvmrc' upon the checkout. Skipping 'nvm install'."
fi
pnpm-install-on-lockfile-change:
# language=sh
run: |
# Check if any changes occurred to `pnpm-lock.yaml` upon the checkout (between the HEAD@{1} and HEAD revisions).
PNPM_LOCK_CHANGED=$(git diff --name-only HEAD@{1} HEAD -- | grep 'pnpm-lock.yaml')
if [ ! -z "$PNPM_LOCK_CHANGED" ]; then
echo "Changes detected in 'pnpm-lock.yaml' upon the checkout. Running 'pnpm install'."
pnpm install
else
echo "No changes detected in 'pnpm-lock.yaml' upon the checkout. Skipping 'pnpm install'."
fi
skip:
- merge
- rebase

post-rewrite:
piped: true
commands:
nvm-install-on-nvmrc-change:
# language=sh
run: |
# Check if any changes occurred to `.nvmrc` upon the rewrite (between the ORIG_HEAD and HEAD revisions).
NVMRC_CHANGED=$(git diff --name-only ORIG_HEAD HEAD -- | grep '.nvmrc')
if [ ! -z "$NVMRC_CHANGED" ]; then
echo "Changes detected in '.nvmrc' upon the rewrite. Running 'nvm install'."
nvm install
else
echo "No changes detected in '.nvmrc' upon the rewrite. Skipping 'nvm install'."
fi
pnpm-install-on-lockfile-change:
# language=sh
run: |
# Check if any changes occurred to `pnpm-lock.yaml` upon the rewrite (between the ORIG_HEAD and HEAD revisions).
PNPM_LOCK_CHANGED=$(git diff --name-only ORIG_HEAD HEAD -- | grep 'pnpm-lock.yaml')
if [ ! -z "$PNPM_LOCK_CHANGED" ]; then
echo "Changes detected in 'pnpm-lock.yaml' upon the rewrite. Running 'pnpm install'."
pnpm install
else
echo "No changes detected in 'pnpm-lock.yaml' upon the rewrite. Skipping 'pnpm install'."
fi
skip_output:
- meta
- summary
remotes:
- git_url: https://github.com/rainstormy/presets-lefthook
ref: v1.1.0
configs:
- dependencies.yml
- quality-assurance.yml

0 comments on commit 23b82b9

Please sign in to comment.