mirror of
https://github.com/luongnv89/claude-howto.git
synced 2026-05-14 10:12:24 +02:00
7db5ade777
Added comprehensive examples for Claude Code features including slash commands, subagents, memory, MCP protocol, skills, and plugins with documentation and quick reference guides. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
36 lines
825 B
JavaScript
36 lines
825 B
JavaScript
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Pre-deployment hook
|
|
* Validates environment and prerequisites before deployment
|
|
*/
|
|
|
|
async function preDeploy() {
|
|
console.log('Running pre-deployment checks...');
|
|
|
|
const { execSync } = require('child_process');
|
|
|
|
// Check if kubectl is installed
|
|
try {
|
|
execSync('which kubectl', { stdio: 'pipe' });
|
|
} catch (error) {
|
|
console.error('❌ kubectl not found. Please install Kubernetes CLI.');
|
|
process.exit(1);
|
|
}
|
|
|
|
// Check if connected to cluster
|
|
try {
|
|
execSync('kubectl cluster-info', { stdio: 'pipe' });
|
|
} catch (error) {
|
|
console.error('❌ Not connected to Kubernetes cluster');
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log('✅ Pre-deployment checks passed');
|
|
}
|
|
|
|
preDeploy().catch(error => {
|
|
console.error('Pre-deploy hook failed:', error);
|
|
process.exit(1);
|
|
});
|