aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile18
-rw-r--r--WISHLIST.md17
-rwxr-xr-xscripts/notarize.sh18
-rwxr-xr-xscripts/sign.sh35
-rwxr-xr-xscripts/upload.sh32
5 files changed, 118 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 11b5b55..3cd771f 100644
--- a/Makefile
+++ b/Makefile
@@ -3,8 +3,22 @@ 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
+deploy_host := deploy@conchos.bdr.sh
+deploy_path := /srv/http/build.r.bdr.sh/map
-distribute: archive package generate_appcast
+distribute: archive package notarize repackage generate_appcast sign_distributable upload
+
+sign_distributable:
+ @scripts/sign.sh "$(project_name)" "$(build_directory)"
+
+upload:
+ @scripts/upload.sh "$(project_name)" "$(build_directory)" "$(deploy_host):$(deploy_path)"
+
+notarize:
+ @scripts/notarize.sh "$(project_name)" "$(build_directory)"
+
+repackage:
+ @scripts/package.sh "$(project_name)" "$(build_directory)"
build:
@xcodebuild build -scheme Map
@@ -30,4 +44,4 @@ format:
lint:
@swift format lint -r .
-.PHONY: package prepare archive generate_appcast package distribute format lint build test
+.PHONY: package prepare archive generate_appcast package distribute format lint build test notarize sign_distributable upload repackage
diff --git a/WISHLIST.md b/WISHLIST.md
new file mode 100644
index 0000000..5125397
--- /dev/null
+++ b/WISHLIST.md
@@ -0,0 +1,17 @@
+# Wishlist
+
+This file has a list of fixes or features that I'd like to build in the near
+future.
+
+- Smart editor: Turn vertices into tokens so it's easy to rename a vertex
+ in one single operation without having to re-type
+- Make the app scriptable using applescript, custom urls and shortcuts.
+- Allow more customization:
+ - Editor color schemes
+ - Map color schemes (eg. for groups) / Map coloring.
+- More preferences
+ - Toggle smart quotes
+- Architecture updates:
+ - Remove parsing duplication, and parse once into a structure that can be
+ used for all other operations.
+ - Improve memory use and load with many files open.
diff --git a/scripts/notarize.sh b/scripts/notarize.sh
new file mode 100755
index 0000000..dc462a2
--- /dev/null
+++ b/scripts/notarize.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+
+set -e
+
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <project_name> <build_directory>"
+ exit 1
+fi
+
+project_name="$1"
+build_directory="$2"
+
+app_path="${build_directory}/${project_name}.app"
+app_version=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" ${app_path}/Contents/Info.plist)
+dmg_path="${build_directory}/${project_name}-${app_version}.dmg"
+xcrun notarytool submit ${dmg_path} --wait --verbose --keychain-profile "Apps @ Unlimited Pizza"
+stapler staple "${app_path}"
diff --git a/scripts/sign.sh b/scripts/sign.sh
new file mode 100755
index 0000000..7531ee7
--- /dev/null
+++ b/scripts/sign.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+
+set -e
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <project_name> <build_directory>"
+ exit 1
+fi
+
+project_name="$1"
+build_directory="$2"
+
+app_path="${build_directory}/${project_name}.app"
+app_version=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" ${app_path}/Contents/Info.plist)
+build_number=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" ${app_path}/Contents/Info.plist)
+dmg_path="${build_directory}/${project_name}-${app_version}.dmg"
+
+COMMENT="Version: ${app_version}, File: $(basename ${dmg_path}) Built on: $(date +'%Y-%m-%d %H:%M')"
+
+if [ -f ~/.minisign/minisign.pass ]; then
+ cat ~/.minisign/minisign.pass | minisign -Sm "${dmg_path}" -t "${COMMENT}"
+else
+ minisign -Sm "${dmg_path}" -t "${COMMENT}"
+fi
+
+for delta_file in "${build_directory}/${project_name}${build_number}"-*.delta; do
+ if [ -f "$delta_file" ]; then
+ COMMENT="Version: ${app_version}, File: $(basename ${delta_file}) Built on: $(date +'%Y-%m-%d %H:%M')"
+ if [ -f ~/.minisign/minisign.pass ]; then
+ cat ~/.minisign/minisign.pass | minisign -Sm "${dmg_path}" -t "${COMMENT}"
+ else
+ minisign -Sm "${delta_file}" -t "${COMMENT}"
+ fi
+ fi
+done
diff --git a/scripts/upload.sh b/scripts/upload.sh
new file mode 100755
index 0000000..53c45b4
--- /dev/null
+++ b/scripts/upload.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+
+set -e
+
+
+if [ "$#" -ne 3 ]; then
+ echo "Usage: $0 <project_name> <build_directory> <upload_location>"
+ exit 1
+fi
+
+project_name="$1"
+build_directory="$2"
+upload_location="$3"
+
+app_path="${build_directory}/${project_name}.app"
+app_version=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" ${app_path}/Contents/Info.plist)
+build_number=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" ${app_path}/Contents/Info.plist)
+dmg_path="${build_directory}/${project_name}-${app_version}.dmg"
+
+echo "Uploading ${dmg_path} to ${upload_location}"
+rsync -avz "${dmg_path}" "${upload_location}"
+rsync -avz "${dmg_path}".minisig "${upload_location}"
+
+for delta_file in "${build_directory}/${project_name}${build_number}"-*.delta; do
+ if [ -f "$delta_file" ]; then
+ echo "Uploading ${delta_file} to ${upload_location}"
+ rsync -avz "$delta_file" "${upload_location}"
+ if [ -f "${delta_file}.minisig" ]; then
+ rsync -avz "${delta_file}.minisig" "${upload_location}"
+ fi
+ fi
+done