Files
textmate/deploy.ninja
Allan Odgaard 27a7dd8815 Add some optional build rules for notarization/release notes
These can be included from a potential $USER.ninja file.
2019-06-29 14:12:29 +02:00

50 lines
2.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# This build file contains rules related to deployment.
#
# The following variables are used by the rules:
#
# `version`: Current version (for release notes)
# `bundle_id`: Primary bundle identifier (for notarization)
# `user`: Apple ID (for notarization)
# `pass`: Password (for notarization)
# `keyfile`: OpenSSL signing key (for deployment)
rule notarize_submit
command = xcrun altool --notarize-app -u $user -p $pass --output-format xml > $out~ -f $in --primary-bundle-id $bundle_id -t osx && mv $out~ $out
description = Submit notarization request for $in
rule notarize_status
command = bin/notarize_await "xcrun altool --notarization-info '$$(plutil -extract notarization-upload.RequestUUID xml1 -o - $in|sed -n 's/.*<string>\(.*\)<\/string>.*/\1/p')' -u $user -p $pass --output-format xml" > $out~ && mv $out~ $out
description = Waiting for notarization…
rule notarize_staple
command = xcrun stapler staple $in && touch $out && spctl -a -v $in
description = Notarize (staple) $in
rule zip_archive
command = /usr/bin/ditto -ck --keepParent --norsrc --noextattr --noacl --noqtn $in $out~ && mv $out~ $out
description = Create zip archive for $in
rule tbz_archive
command = COPYFILE_DISABLE=1 tar $bzip2_flag -cf $out~ -C "$$(dirname $in)" "$$(basename $in)" && mv $out~ $out
description = Create tbz archive for $in
generator = true
rule sign_archive
command = set -o pipefail; openssl dgst -dss1 -sign $keyfile $in|openssl > $out~ enc -base64 && mv $out~ $out
description = Sign $in
rule update_changes
command = bin/update_changes -t "v${version}" $in > $in~ && mv $in~ $in && mate -wl5 $in && touch $out
description = Update changes for ${version}…
generator = true
rule git_commit
command = git commit -vem"Checkin release notes for ${version}" $in && touch $out
description = Commit release notes…
generator = true
rule git_tag
command = printf 'Deployment build\n%s\nSDK: %s (requires %s)\n%s\n' "$$(xcrun clang --version)" "$$(xcrun --show-sdk-version)" "$APP_MIN_OS" "$$("$capnp_prefix/bin/capnp" --version)" | git tag -a "v${version}" -F - && touch $out
description = Tag release v${version}…
generator = true