]> git.r.bdr.sh - rbdr/map/blobdiff - Makefile
3.0.0
[rbdr/map] / Makefile
index fe56dfc322dc8cf63cfcd5b85768131ad66bb676..8d1a3b165a64d578d9b499b0c91a12a6674450a5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,27 @@
-swift_version = 5.3
+project_name := Map
+derived_data_path := ~/Library/Developer/Xcode/DerivedData
+sparkle_path := $(shell find $(derived_data_path) -type d -path '*artifacts/sparkle/Sparkle' -print -quit)
+build_directory := builds
+sparkle_account := tranquil.systems
+
+distribute: archive package generate_appcast
+
+package:
+       @scripts/package.sh "$(project_name)" "$(build_directory)"
+
+generate_appcast:
+       @$(sparkle_path)/bin/generate_appcast --account $(sparkle_account) $(build_directory)
+
+archive: prepare
+       xcodebuild -project $(project_name).xcodeproj -scheme $(project_name) -configuration Release -archivePath $(build_directory)/$(project_name).xcarchive archive && xcodebuild -exportArchive -archivePath $(build_directory)/$(project_name).xcarchive -exportPath $(build_directory) -exportOptionsPlist export_options.plist
+
+prepare:
+       mkdir -p $(build_directory)
 
 format:
        swift format -i -r .
 
 lint:
 
 format:
        swift format -i -r .
 
 lint:
-       swift format -m lint -r .
-
-docker-build:
-       docker build --force-rm --build-arg swift_version=$(swift_version) -t doapp/do:$(swift_version) .
-
-docker-push: docker-build
-       docker push doapp/do:$(swift_version)
+       swift format lint -r .
 
 
-.PHONY: format lint docker-build docker-push
+.PHONY: package prepare archive generate_appcast package distribute format lint