Skip to content

Instantly share code, notes, and snippets.

@tschob
Last active November 7, 2021 15:05
Show Gist options
  • Save tschob/ea0c850359f82455ba1ba7d0fa0110b7 to your computer and use it in GitHub Desktop.
Save tschob/ea0c850359f82455ba1ba7d0fa0110b7 to your computer and use it in GitHub Desktop.
Example Makefile for the usage as enviroment setup script for iOS projects.
.PHONY: help
help:
@echo "You can specify one of the following commands:\n"
@echo "- bootstrap: Sets up all developer tools and calls \`make workspace\`"
@echo "- workspace: Prepares the workspace by generating the projects with XcodeGen and installing Pods"
@echo "- dev-tools: Sets up all developer tools (Homebrew, Gems, ...)"
@echo "- translations: Downloads the translations and generates constants for them"
@echo "- pod-install: Installs the Pods"
@echo "- clean-all: Deletes all dependencies and calls \`make clean-workspace\`"
@echo "- clean-workspace: Deletes the Pod dependencies\n"
# - Setup
.PHONY: bootstrap
bootstrap: dev-tools workspace
.PHONY: workspace
workspace:
@echo ">>> Generating Xcode projects with XcodeGen ..."
./scripts/generate-projects.sh
@make pod-install
# - Cleaning
.PHONY: clean-all
clean-all: clean-workspace
@echo ">>> Deleting Gems ..."
rm -rf vendor/bundle
.PHONY: clean-workspace
clean-workspace:
./scripts/clean-generated-projects.sh
# - Dependencies
.PHONY: pod-install
pod-install:
@echo ">>> Installing Pods according to the versions declared in Podfile.lock ..."
./scripts/install-pods-with-retry.sh
.PHONY: dev-tools
dev-tools:
@echo ">>> Installing Developer Tools (Homebrew, Gems, ...) ..."
./scripts/install_developer_tools.sh
# - Custom scripts
.PHONY: translations
translations:
@echo ">>> Downloading translations and generating the corresponding source files ..."
./scripts/update_translations.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment