chore: fixes, several improvements and refactorings (#2)

* chore: fixes

* chore: rubocop fixes, linting, etc.

* chore: switching to use `brew style` only

* chore: use `brew style` for linting, skip example formulae in ci.yml

* chore(lint): fixes, additions and tweaks
This commit is contained in:
2025-09-23 11:29:53 +03:00
committed by GitHub
parent 310ac4946a
commit 6dc9a170cc
16 changed files with 678 additions and 472 deletions

View File

@@ -1,7 +1,7 @@
# Homebrew Tap Makefile
# Provides convenient commands for building and managing the tap documentation
.PHONY: help build serve parse clean test install dev setup check
.PHONY: help build serve parse clean test install dev setup check lint update
# Default target
.DEFAULT_GOAL := help
@@ -87,6 +87,35 @@ install: ## Install development dependencies (if Gemfile exists)
echo " No Gemfile found, skipping dependency installation"; \
fi
update: ## Update all gems to their latest versions (respecting Gemfile constraints)
@if [ -f Gemfile ]; then \
echo "🔄 Updating Ruby dependencies..."; \
echo "📦 Running bundle update..."; \
bundle update; \
echo "✅ All gems updated to latest versions!"; \
echo ""; \
echo "💡 Current gem versions:"; \
bundle list | grep -E "^\s*\*" | head -10; \
else \
echo "❌ No Gemfile found"; \
exit 1; \
fi
update-bundler: ## Update bundler itself to the latest version
@echo "🔄 Updating Bundler..."
@gem update bundler
@echo "✅ Bundler updated!"
@echo "Current version: $$(bundle --version)"
outdated: ## Show outdated gems
@if [ -f Gemfile ]; then \
echo "📋 Checking for outdated gems..."; \
bundle outdated || true; \
else \
echo "❌ No Gemfile found"; \
exit 1; \
fi
watch: ## Watch for file changes and auto-rebuild (alias for serve)
@$(MAKE) serve
@@ -116,6 +145,10 @@ tap-install: ## Install this tap locally for testing
@echo "🍺 Installing tap locally..."
@brew tap $$(pwd)
lint: ## Lint all Ruby scripts
@echo "🔍 Linting Ruby scripts..."
@brew style --fix --reset-cache .
formula-new: ## Create a new formula template (usage: make formula-new NAME=myformula)
@if [ -z "$(NAME)" ]; then \
echo "❌ Please provide a formula name: make formula-new NAME=myformula"; \