]> git.r.bdr.sh - rbdr/map/blobdiff - Makefile
Update license URL
[rbdr/map] / Makefile
index c02a2276e9ec30412e53433737d35a645131f279..8d1a3b165a64d578d9b499b0c91a12a6674450a5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,22 @@
-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 .
 
 format:
        swift format -i -r .
@@ -6,4 +24,4 @@ format:
 lint:
        swift format lint -r .
 
 lint:
        swift format lint -r .
 
-.PHONY: format lint docker-build docker-push
+.PHONY: package prepare archive generate_appcast package distribute format lint