Created
January 28, 2016 20:01
-
-
Save andrewroycarter/0ff680fa6dc5250bd1fc to your computer and use it in GitHub Desktop.
Example Makr Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by Makr 1.4.2 | |
# https://github.com/willowtreeapps/Makr | |
# Path for built products | |
ARTIFACTS_PATH = artifacts | |
# Path for built archives | |
ARCHIVES_PATH = $(ARTIFACTS_PATH)/archives | |
# Path for built IPAs | |
IPAS_PATH = $(ARTIFACTS_PATH)/ipas | |
# Provisioning profiles dir | |
PROFILES_DIR = $(CURDIR)/profiles | |
# Temporary build dir | |
TEMP_DIR = $(CURDIR)/tmp | |
# Build environment vars | |
CONFIGURATION_BUILD_DIR = $(TEMP_DIR)/configuration | |
BUILD_ENV_OPTIONS = SHARED_PRECOMPS_DIR="$(TEMP_DIR)/precomps" | |
# Archives | |
ARCHIVES = $(ARCHIVES_PATH)/adhoc.xcarchive | |
# IPAs | |
IPAS = $(IPAS_PATH)/adhoc | |
# Generates all IPAs | |
all: $(IPAS) | |
# Create profiles directory | |
$(PROFILES_DIR): | |
mkdir $@ | |
# Install provisioning profiles | |
install-profiles: $(PROFILES_DIR) | |
rsync -av ./profiles/ ~/Library/MobileDevice/Provisioning\ Profiles/ | |
# Create adhoc.xcarchive | |
$(ARCHIVES_PATH)/adhoc.xcarchive: | |
xcodebuild archive $(BUILD_ENV_OPTIONS) \ | |
-scheme "app" \ | |
-project "app.xcodeproj" \ | |
-configuration "Release" \ | |
-archivePath $@ | |
rm -rf $(TEMP_DIR) | |
# Create adhoc/adhoc.ipa | |
$(IPAS_PATH)/adhoc: $(IPAS_PATH) $(ARCHIVES_PATH)/adhoc.xcarchive | |
xcodebuild -exportArchive \ | |
-exportOptionsPlist "adhoc.plist" \ | |
-archivePath "$(ARCHIVES_PATH)/adhoc.xcarchive" \ | |
-exportPath "$@" | |
# Path to built IPAs | |
$(IPAS_PATH): | |
mkdir -p $(IPAS_PATH) | |
# Run all distribution tasks | |
distribute-all: | |
# Clean artifacts and temp directories | |
clean: | |
rm -rf $(ARTIFACTS_PATH) | |
rm -rf $(TEMP_DIR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment