From c3080b4cbfc23bfa5e5aaca43854063127583888 Mon Sep 17 00:00:00 2001 From: Alexander Ignition Date: Thu, 25 Nov 2021 18:51:59 +0300 Subject: [PATCH] Update Makefile --- Makefile | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 1ac0796..3d1034e 100644 --- a/Makefile +++ b/Makefile @@ -1,31 +1,38 @@ -test: - $(call test) +PACKAGE_PATH = Packages/CatbirdApp +BUILD_CATBIRD_APP = swift build \ + --disable-sandbox \ + --configuration release \ + --package-path $(PACKAGE_PATH) + +test-api: + swift test --enable-code-coverage $(call cov_report,Catbird) - cd Packages/CatbirdApp; $(call test) - cd Packages/CatbirdApp; $(call cov_report,CatbirdApp) + +test-app: + swift test --enable-code-coverage --disable-automatic-resolution --package-path $(PACKAGE_PATH) + cd $(PACKAGE_PATH) && $(call cov_report,CatbirdApp) + +test: test-api test-app release: - cd Packages/CatbirdApp && swift build -c release - cp Packages/CatbirdApp/.build/release/catbird ./catbird + $(BUILD_CATBIRD_APP) + cp $(shell $(BUILD_CATBIRD_APP) --show-bin-path)/catbird ./catbird archive: zip -v catbird.zip catbird LICENSE - cd Packages/CatbirdApp && zip ../../catbird.zip -r -v start.sh stop.sh Public Resources - cd Packages/CatbirdAPI && zip ../../catbird.zip -r -v Sources/CatbirdAPI + cd $(PACKAGE_PATH) && zip ../../catbird.zip -r -v start.sh stop.sh Public Resources + cd Packages/CatbirdAPI/ && zip ../../catbird.zip -r -v Sources/CatbirdAPI update: - swift package update + swift package update --package-path $(PACKAGE_PATH) clean: swift package clean + swift package clean --package-path $(PACKAGE_PATH) lint: bundle exec pod spec lint -define test - swift test --enable-code-coverage --disable-automatic-resolution -endef - define cov_report xcrun llvm-cov report \ .build/debug/$(1)PackageTests.xctest/Contents/MacOS/$(1)PackageTests \