Sha256: b57aff6b14fa4d206bf7d5d21559a4752eb82e19806262d39dea93a197d3983a

Contents?: true

Size: 482 Bytes

Versions: 1

Compression:

Stored size: 482 Bytes

Contents

#!/usr/bin/env ruby

unless File.directory?(".git/hooks")
  puts "Pasta .git/hooks não encontrada. Certifique-se de estar no diretório raiz do seu repositório Git."
  exit 1
end

# Copia o pre-commit do CLI para a pasta .git/hooks do projeto
source_file = File.join(".hooks", "pre-commit")
destination_file = File.join(".git", "hooks", "pre-commit")

FileUtils.cp(source_file, destination_file)
File.chmod(0755, destination_file)

puts "Hook pre-commit configurado com sucesso!"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shellboxCLI-0.1.10 lib/ios/hooks/install-hooks.rb