Skip to content

Commit

Permalink
🧑‍💻 (tools): Use make to hide different tools usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Dec 10, 2023
1 parent d095953 commit d362982
Showing 1 changed file with 62 additions and 1 deletion.
63 changes: 62 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,69 @@
# Copyright 2023 APF France handicap
# SPDX-License-Identifier: Apache-2.0

#
# MARK: - Options
#

GENERATE_MODULES_AS_FRAMEWORKS_FOR_DEBUG ?= TRUE
TURN_OFF_LINTERS ?= FALSE


#
# MARK: - Build targets
#

fetch:
@echo "Fetching dependencies..."
@tuist fetch

config:
@echo "Generating project..."
@TUIST_GENERATE_MODULES_AS_FRAMEWORKS_FOR_DEBUG=$(GENERATE_MODULES_AS_FRAMEWORKS_FOR_DEBUG) \
TUIST_TURN_OFF_LINTERS=$(TURN_OFF_LINTERS) \
tuist generate

build:
@echo "Building project..."
@TUIST_GENERATE_MODULES_AS_FRAMEWORKS_FOR_DEBUG=$(GENERATE_MODULES_AS_FRAMEWORKS_FOR_DEBUG) \
TUIST_TURN_OFF_LINTERS=$(TURN_OFF_LINTERS) \
tuist build

clean:
@echo "Cleaning project..."
@tuist clean
@rm -rf .build
@rm -rf ~/Library/Developer/Xcode/DerivedData
@gfind . -type d -name "*.xcodeproj" -exec rm -rf {} +


#
# MARK: - Tools targets
#

setup:
@echo "Setting up dev environment..."
@brew update && brew upgrade
@brew install swiftformat swiftlint fastlane
@brew install tuist --no-quarantine

sync_certificates:
@echo "Syncing certificates..."
@export FASTLANE_SKIP_UPDATE_CHECK=1
@fastlane sync_certificates

git_hooks:
@echo "Installing pre-commit hooks..."
@brew install pre-commit
@pre-commit install
@echo "Installing pre-commit hooks...✅"

format:
@echo "Formatting code..."
@swiftlint --quiet --fix
@swiftformat .

lint:
@echo "Linting code..."
@-swiftlint --quiet --fix && swiftlint --quiet --progress
@echo ""
@-swiftformat --lint .

0 comments on commit d362982

Please sign in to comment.