X-Git-Url: https://git.r.bdr.sh/rbdr/map/blobdiff_plain/5e8ff4850c4827125fe12788dd5b153c4f636f48..8a50aceaf20dd2e9c06b278c8b252ebee91b6174:/Makefile

diff --git a/Makefile b/Makefile
index fe56dfc..8d1a3b1 100644
--- 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:
-	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