@@ -6,7 +6,7 @@ GREEN='\033[1;32m'
66NC=' \033[0m' # No Color
77
88confirm () {
9- green " \n $1 (y/n): "
9+ green " $1 (y/n): "
1010 read answer
1111
1212 if [ $answer != " y" ]
@@ -19,22 +19,26 @@ green () {
1919 printf " ${GREEN}${1}${NC} "
2020}
2121
22- signature=" Developer ID Application: Ian Leitch (8L8F8HSTR4)"
23- password=" @keychain:PeripheryNotarize"
24- bundle_id=" com.github.peripheryapp"
22+ codesign () {
23+ /usr/bin/codesign --force --options=runtime --sign " Developer ID Application: Ian Leitch (8L8F8HSTR4)" " $1 "
24+ }
25+
26+ notarize () {
27+ xcrun notarytool submit --keychain-profile " PeripheryNotarize" --wait " $1 "
28+ }
2529
2630xcodebuild -version
2731
2832printf " \nVersion: "
2933read version
3034printf " Got it: $version \n"
3135
32- confirm " Continue ?"
36+ confirm " \nContinue ?"
3337
3438cat scripts/Version.swift.template | sed s/__VERSION__/${version} / > Sources/Frontend/Version.swift
3539cat scripts/Periphery.podspec.template | sed s/__VERSION__/${version} / > Periphery.podspec
3640
37- echo -e " \nUpdate CHANGELOG.md and verify changes. "
41+ echo -e " \nUpdate CHANGELOG.md"
3842confirm " Continue?"
3943
4044bin_path=$( make show_bin_path)
@@ -46,19 +50,39 @@ cp "$bin_path" .release/
4650cp LICENSE.md .release/
4751cp scripts/release_notes.md.template .release/release_notes.md
4852
49- # Archive
53+ # Codesign
5054cd .release
51- codesign --force --options=runtime --sign " $signature " periphery
52- zip_filename=" periphery-v${version} .zip"
55+ codesign periphery
56+
57+ # Archive
58+ zip_filename=" periphery-${version} .zip"
5359zip " ${zip_filename} " periphery LICENSE.md
54- codesign --force --options=runtime --sign " $signature " " ${zip_filename} "
55- xcrun altool --notarize-app --primary-bundle-id " ${bundle_id} " --password " ${password} " --file " ${zip_filename} "
60+ codesign " ${zip_filename} "
5661
57- echo " Checksum :"
62+ echo " \n ${zip_filename} checksum :"
5863sha256=$( shasum -a 256 ${zip_filename} | awk ' {print $1}' )
5964echo ${sha256}
6065
61- echo -e " \nWait for notarization approval: xcrun altool --notarization-history 0 -p \" $password \" "
66+ # Artifact bundle
67+ artifactbundle_zip_filename=" periphery-${version} -macos.artifactbundle.zip"
68+ cat ../scripts/info.json.template | sed s/__VERSION__/${version} / > info.json
69+ mkdir -p " periphery-${version} -macos/bin"
70+ cp periphery " periphery-${version} -macos/bin"
71+ zip " ${artifactbundle_zip_filename} " LICENSE.md info.json " periphery-${version} -macos/bin/periphery"
72+ codesign " ${artifactbundle_zip_filename} "
73+
74+ echo " \n${artifactbundle_zip_filename} checksum:"
75+ artifactbundle_sha256=$( shasum -a 256 ${artifactbundle_zip_filename} | awk ' {print $1}' )
76+ echo ${artifactbundle_sha256}
77+
78+ echo -e " \nUpdate Package.swift"
79+ confirm " Continue?"
80+
81+ # Notarize
82+ notarize " ${zip_filename} "
83+ notarize " ${artifactbundle_zip_filename} "
84+
85+ echo -e " \nVerify changes"
6286confirm " Continue?"
6387
6488# GitHub
@@ -75,7 +99,7 @@ cat release_notes.md
7599echo
76100
77101cd ..
78- hub release create " ${version} " -a .release/periphery-v ${version} .zip -F .release/release_notes.md
102+ gh release create -F .release/release_notes.md " ${version} " " .release/${zip_filename} " " .release/${artifactbundle_zip_filename} "
79103
80104# HomeBrew
81105cd ../homebrew-periphery
0 commit comments