chore: drop disabled husky pre-push hook and dependency
The .husky/_pre-push script was renamed from pre-push, which disables it under husky v9. With no remaining active hooks, husky is dead weight, so remove the dependency and prepare script too.
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
# Define the checksum file
|
||||
CHECKSUM_FILE=".env.checksum"
|
||||
|
||||
# Calculate the current checksum of the .env file
|
||||
CURRENT_CHECKSUM=$(shasum -a 256 .env | awk '{ print $1 }')
|
||||
|
||||
# Check if checksum file exists
|
||||
if [ -f "$CHECKSUM_FILE" ]; then
|
||||
# Read the previous checksum
|
||||
PREVIOUS_CHECKSUM=$(cat "$CHECKSUM_FILE")
|
||||
|
||||
# Compare the current checksum with the previous checksum
|
||||
if [ "$CURRENT_CHECKSUM" = "$PREVIOUS_CHECKSUM" ]; then
|
||||
echo ".env file has not changed. Skipping Netlify environment import."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# If the checksum is different or the file doesn't exist, import the variables
|
||||
echo "Importing environment variables to Netlify..."
|
||||
netlify env:import .env
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to import environment variables to Netlify. Aborting push."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Save the new checksum
|
||||
echo "$CURRENT_CHECKSUM" > "$CHECKSUM_FILE"
|
||||
|
||||
# Stage the checksum file
|
||||
git add "$CHECKSUM_FILE"
|
||||
|
||||
# Amend the last commit with the updated checksum
|
||||
git commit -m "Update .env checksum"
|
||||
|
||||
echo "Environment variables imported successfully."
|
||||
@@ -12,7 +12,6 @@
|
||||
"lint:fix": "oxlint --fix",
|
||||
"fmt": "oxfmt",
|
||||
"fmt:check": "oxfmt --check",
|
||||
"prepare": "husky",
|
||||
"theme:light": "esno _scripts/change-theme-light.ts",
|
||||
"theme:dark": "esno _scripts/change-theme-dark.ts"
|
||||
},
|
||||
@@ -84,7 +83,6 @@
|
||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||
"eslint-plugin-unused-imports": "^4.4.1",
|
||||
"esno": "^4.8.0",
|
||||
"husky": "^9.1.7",
|
||||
"oxfmt": "^0.42.0",
|
||||
"oxlint": "^1.57.0",
|
||||
"prettier": "^3.8.1",
|
||||
|
||||
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
@@ -204,9 +204,6 @@ importers:
|
||||
esno:
|
||||
specifier: ^4.8.0
|
||||
version: 4.8.0
|
||||
husky:
|
||||
specifier: ^9.1.7
|
||||
version: 9.1.7
|
||||
oxfmt:
|
||||
specifier: ^0.42.0
|
||||
version: 0.42.0
|
||||
@@ -4052,11 +4049,6 @@ packages:
|
||||
resolution: {integrity: sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==}
|
||||
engines: {node: '>=14.18.0'}
|
||||
|
||||
husky@9.1.7:
|
||||
resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==}
|
||||
engines: {node: '>=18'}
|
||||
hasBin: true
|
||||
|
||||
ico-endec@0.1.6:
|
||||
resolution: {integrity: sha512-ZdLU38ZoED3g1j3iEyzcQj+wAkY2xfWNkymszfJPoxucIUhK7NayQ+/C4Kv0nDFMIsbtbEHldv3V8PU494/ueQ==}
|
||||
|
||||
@@ -10762,8 +10754,6 @@ snapshots:
|
||||
|
||||
human-signals@4.3.1: {}
|
||||
|
||||
husky@9.1.7: {}
|
||||
|
||||
ico-endec@0.1.6: {}
|
||||
|
||||
iconv-lite@0.4.24:
|
||||
|
||||
Reference in New Issue
Block a user