Skip to content

Commit

Permalink
Project improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszj committed Jun 28, 2016
1 parent d1f2cfc commit 2258939
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@ fastlane/test_output
/output

*.xcarchive
acextract.bin
acextract.bin
acextract.zip
36 changes: 29 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.PHONY: \
iphone ipad ios mac tv watch \
assets \
build
build test \
zip release

define ACTOOL
xcrun actool \
Expand All @@ -14,7 +15,8 @@ ASSETS := "Assets.car"
DATA := "acextractTests/data"

all:


# Builad assets
assets: iphone ipad ios mac tv watch

iphone:
Expand Down Expand Up @@ -100,12 +102,32 @@ watch:
mv $(ASSETS) $(DATA)/assets_watch.car

# Build app
PROJECT := acextract.xcodeproj
SCHEME := acextract
ARCHIVE := acextract.xcarchive
ACEXTRACT_BIN_PATH := $(ARCHIVE)/Products/usr/local/bin/acextract
build:
-rm -r ${ARCHIVE}
-rm -r $(ARCHIVE)
xcodebuild \
-project acextract.xcodeproj \
-scheme acextract \
-archivePath ${PWD}/$(ARCHIVE) \
-project $(PROJECT) \
-scheme $(SCHEME) \
-archivePath $(PWD)/$(ARCHIVE) \
archive | xcpretty -c
cp $(ARCHIVE)/Products/usr/local/bin/acextract ${PWD}/acextract.bin
-rm $(PWD)/acextract.bin
cp $(ACEXTRACT_BIN_PATH) $(PWD)/acextract.bin

# Run unit tests
test:
xcodebuild \
-project $(PROJECT) \
-scheme $(SCHEME) \
test | xcpretty -c

# Build and prepare ZIP file for release
ZIP := acextract.zip
zip: build
-rm $(ZIP)
zip -j $(ZIP) $(ACEXTRACT_BIN_PATH)

# Release shourtcut
release: test zip

0 comments on commit 2258939

Please sign in to comment.