Skip to content

Commit

Permalink
Fix notary credentials (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored May 26, 2024
1 parent ed55ee6 commit 52b3868
Showing 1 changed file with 10 additions and 96 deletions.
106 changes: 10 additions & 96 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2022,95 +2022,6 @@
MAC NOTARY FOR JPACKAGE
================================================================= -->

<target name="submit-notary-altool" if="sign.enable">
<exec executable="/usr/bin/xcrun" failonerror="true">
<redirector output="retUUID.txt" alwayslog="true"/>
<arg value="altool"/>
<arg value="--notarize-app"/>
<arg value="--type"/>
<arg value="osx"/>
<arg value="--primary-bundle-id"/>
<arg value="app.${ant.project.name}-${app.version}"/>
<arg value="--username"/>
<arg value="${notarize.account}"/>
<arg value="--password"/>
<arg value="${notarize.keychain_key}"/>
<!-- <arg value="@keychain:${notarize.keychain_key}"/> -->
<arg value="--file"/>
<arg value="${dist.dir}/${ant.project.name}-${app.version}.dmg"/>
</exec>
<loadfile property="retUUID" srcfile="retUUID.txt">
<filterchain>
<tokenfilter>
<containsregex
pattern="RequestUUID\s*\=\s*([0-9a-fA-F-]+)$"
replace="\1" />
</tokenfilter>
<striplinebreaks/>
</filterchain>
</loadfile>
<echo>notarize-app:${retUUID}</echo>
</target>

<target name="post-notary-altool" if="sign.enable">
<loadfile property="retUUID" srcfile="retUUID.txt">
<filterchain>
<tokenfilter>
<containsregex
pattern="RequestUUID\s*\=\s*([0-9a-fA-F-]+)$"
replace="\1" />
</tokenfilter>
<striplinebreaks/>
</filterchain>
</loadfile>
<sleep minutes="10"/>
<exec executable="/usr/bin/xcrun" failonerror="true" outputproperty="logInfo" resultproperty="logUUID">
<redirector output="notary.txt" alwayslog="true"/>
<arg value="altool"/>
<arg value="--notarization-info"/>
<arg value="${retUUID}"/>
<arg value="--username"/>
<arg value="${notarize.account}"/>
<arg value="--password"/>
<arg value="${notarize.keychain_key}"/>
<!-- <arg value="@keychain:${notarize.keychain_key}"/> -->
</exec>
<condition property="isnotarized">
<resourcecontains resource="notary.txt" substring="success"/>
</condition>
<echo>notarize-info:${logInfo}</echo>
</target>

<target name="zip-submit-notary-altool" if="sign.enable">
<exec executable="/usr/bin/xcrun" failonerror="true">
<redirector output="retUUID.txt" alwayslog="true"/>
<arg value="altool"/>
<arg value="--notarize-app"/>
<arg value="--type"/>
<arg value="osx"/>
<arg value="--primary-bundle-id"/>
<arg value="app.${ant.project.name}-${app.version}"/>
<arg value="--username"/>
<arg value="${notarize.account}"/>
<arg value="--password"/>
<arg value="${notarize.keychain_key}"/>
<!-- <arg value="@keychain:${notarize.keychain_key}"/> -->
<arg value="--file"/>
<arg value="${dist.dir}/${ant.project.name}-${app.version}.zip"/>
</exec>
<loadfile property="retUUID" srcfile="retUUID.txt">
<filterchain>
<tokenfilter>
<containsregex
pattern="RequestUUID\s*\=\s*([0-9a-fA-F-]+)$"
replace="\1" />
</tokenfilter>
<striplinebreaks/>
</filterchain>
</loadfile>
<echo>notarize-app:${retUUID}</echo>
</target>

<target name="submit-notary" if="sign.enable">
<exec executable="/usr/bin/xcrun" failonerror="true">
<redirector output="retUUID.txt" alwayslog="true"/>
Expand All @@ -2122,8 +2033,9 @@
<arg value="--team-id"/>
<arg value="${sign.account}"/>
<arg value="--password"/>
<arg value="${notarize.keychain_key}"
<!-- <arg value="@keychain:${notarize.keychain_key}"/> -->
<arg value="${notarize.keychain_key}"/>
<arg value="--team-id"/>
<arg value="${sign.account}"/>
<arg value="${dist.dir}/${ant.project.name}-${app.version}.dmg"/>
</exec>
<loadfile property="retUUID" srcfile="retUUID.txt">
Expand Down Expand Up @@ -2154,14 +2066,15 @@
<redirector output="notary.txt" alwayslog="true"/>
<arg value="notarytool"/>
<arg value="info"/>
<arg value="${retUUID}"/>
<arg value="--username"/>
<arg value="--apple-id"/>
<arg value="${notarize.account}"/>
<arg value="--team-id"/>
<arg value="${sign.account}"/>
<arg value="--password"/>
<arg value="${notarize.keychain_key}"/>
<!-- <arg value="@keychain:${notarize.keychain_key}"/> -->
<arg value="--team-id"/>
<arg value="${sign.account}"/>
<arg value="${retUUID}"/>
</exec>
<condition property="isnotarized">
<resourcecontains resource="notary.txt" substring="success"/>
Expand Down Expand Up @@ -2194,13 +2107,14 @@
<arg value="notarytool"/>
<arg value="submit"/>
<arg value="--wait"/>
<arg value="--username"/>
<arg value="--apple-id"/>
<arg value="${notarize.account}"/>
<arg value="--team-id"/>
<arg value="${sign.account}"/>
<arg value="--password"/>
<arg value="${notarize.keychain_key}"/>
(!-- <arg value="@keychain:${notarize.keychain_key}"/> -->
<arg value="--team-id"/>
<arg value="${sign.account}"/>
<arg value="${dist.dir}/${ant.project.name}-${app.version}.zip"/>
</exec>
<loadfile property="retUUID" srcfile="retUUID.txt">
Expand Down

0 comments on commit 52b3868

Please sign in to comment.