Section 13/171 menit
Unreleased
Unreleased
(lines.joined(separator: "\n")) """
try changelog.write( toFile: "CHANGELOG.md", atomically: true, encoding: .utf8 )
print("✅ CHANGELOG.md updated")
func shellOutput(_ command: String) throws -> String { let process = Process() process.executableURL = URL(fileURLWithPath: "/bin/bash") process.arguments = ["-c", command]
swift
let pipe = Pipe()
process.standardOutput = pipe
try process.run()
process.waitUntilExit()
return String(data: pipe.fileHandleForReading.readDataToEndOfFile(), encoding: .utf8) ?? ""
}
swift
### Makefile Integration
```makefile
# Makefile — unified interface untuk semua operasi
.PHONY: setup generate build test cache clean scaffold
# Initial setup
setup:
mise install
tuist install
tuist generate
@echo "✅ Project setup complete. Open MyApp.xcworkspace"
# Regenerate project setelah perubahan Project.swift
generate:
tuist generate
# Warm binary cache
cache:
tuist cache
# Build tanpa buka Xcode
build:
tuist build MyApp
# Run tests
test:
tuist test MyApp
# Generate module baru
# Usage: make scaffold NAME=Payment
scaffold:
tuist scaffold feature --name $(NAME)
@echo "Sekarang tambahkan 'Projects/Features/Feature$(NAME)' ke Workspace.swift"
@echo "Kemudian jalankan: make generate"
# Clean semua generated files
clean:
rm -rf *.xcodeproj *.xcworkspace
@echo "✅ Generated files removed. Run 'make generate' to regenerate"
# Visualize dependency graph
graph:
tuist graph
open graph.png
# Lint architecture rules
lint:
tuist inspect implicit-imports
swift scripts/lint-architecture.swift