23 lines
804 B
TypeScript
23 lines
804 B
TypeScript
import { execSync } from 'child_process';
|
|
|
|
async function pushUpdates() {
|
|
try {
|
|
console.log('\nAdicionando arquivos de configuração de servidor...');
|
|
execSync('git add public/_redirects public/.htaccess vercel.json', { stdio: 'inherit' });
|
|
|
|
try {
|
|
execSync('git commit -m "build: adiciona regras de spa router para apche, netlify, cloudflare e vercel"', { stdio: 'inherit' });
|
|
} catch (e) {
|
|
console.log('Nada para commitar.');
|
|
}
|
|
|
|
console.log('\nFazendo push do código...');
|
|
execSync('git push origin main', { stdio: 'inherit' });
|
|
|
|
console.log(`\n🎉 Push concluído com sucesso!`);
|
|
} catch (error: any) {
|
|
console.error('\n❌ Ocorreu um erro:', error.message);
|
|
}
|
|
}
|
|
|
|
pushUpdates();
|