diff --git a/eclipse-distribution/org.springframework.boot.ide.product.e412/macos-notarize.sh b/eclipse-distribution/org.springframework.boot.ide.product.e412/macos-notarize.sh new file mode 100755 index 000000000..eaf3bde2b --- /dev/null +++ b/eclipse-distribution/org.springframework.boot.ide.product.e412/macos-notarize.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +DMG=$1 +NOTARIZE_SERVICE_URL=$2 + +RESPONSE=\ +$(curl -s -X POST \ + -F file=@${DMG} \ + -F 'options={"primaryBundleId": "SpringTools4", "staple": true};type=application/json' \ + ${NOTARIZE_SERVICE_URL}/macos-notarization-service/notarize) + +echo "Notarization request submitted" +echo ${RESPONSE} + +UUID=$(echo ${RESPONSE} | jq -r '.uuid') + +STATUS=$(echo ${RESPONSE} | jq -r '.notarizationStatus.status') + +while [[ ${STATUS} == 'IN_PROGRESS' ]]; do + sleep 1m + RESPONSE=$(curl -s ${NOTARIZE_SERVICE_URL}/macos-notarization-service/${UUID}/status) + STATUS=$(echo ${RESPONSE} | jq -r '.notarizationStatus.status') +done + +if [[ ${STATUS} != 'COMPLETE' ]]; then + echo "Notarization failed: ${RESPONSE}" + exit 1 +fi + +mv "${DMG}" "${DMG}-unnotarized" + +curl -o ${DMG} -J ${NOTARIZE_SERVICE_URL}/macos-notarization-service/${UUID}/download diff --git a/eclipse-distribution/org.springframework.boot.ide.product.e412/pom.xml b/eclipse-distribution/org.springframework.boot.ide.product.e412/pom.xml index 24c19f32a..6530c6489 100644 --- a/eclipse-distribution/org.springframework.boot.ide.product.e412/pom.xml +++ b/eclipse-distribution/org.springframework.boot.ide.product.e412/pom.xml @@ -132,6 +132,7 @@ 1.7 + osx-app-signing package @@ -147,10 +148,11 @@ + - + @@ -161,6 +163,7 @@ + osx-dmg-creation verify @@ -197,7 +200,7 @@ - + @@ -208,6 +211,29 @@ + + + osx-dmg-notarizing + verify + + ${skip.osx.notarizing} + + + + + + + + + + + + + + run + + + upload-product-bundles deploy diff --git a/eclipse-distribution/org.springframework.boot.ide.product.e414/macos-notarize.sh b/eclipse-distribution/org.springframework.boot.ide.product.e414/macos-notarize.sh new file mode 100755 index 000000000..eaf3bde2b --- /dev/null +++ b/eclipse-distribution/org.springframework.boot.ide.product.e414/macos-notarize.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +DMG=$1 +NOTARIZE_SERVICE_URL=$2 + +RESPONSE=\ +$(curl -s -X POST \ + -F file=@${DMG} \ + -F 'options={"primaryBundleId": "SpringTools4", "staple": true};type=application/json' \ + ${NOTARIZE_SERVICE_URL}/macos-notarization-service/notarize) + +echo "Notarization request submitted" +echo ${RESPONSE} + +UUID=$(echo ${RESPONSE} | jq -r '.uuid') + +STATUS=$(echo ${RESPONSE} | jq -r '.notarizationStatus.status') + +while [[ ${STATUS} == 'IN_PROGRESS' ]]; do + sleep 1m + RESPONSE=$(curl -s ${NOTARIZE_SERVICE_URL}/macos-notarization-service/${UUID}/status) + STATUS=$(echo ${RESPONSE} | jq -r '.notarizationStatus.status') +done + +if [[ ${STATUS} != 'COMPLETE' ]]; then + echo "Notarization failed: ${RESPONSE}" + exit 1 +fi + +mv "${DMG}" "${DMG}-unnotarized" + +curl -o ${DMG} -J ${NOTARIZE_SERVICE_URL}/macos-notarization-service/${UUID}/download diff --git a/eclipse-distribution/org.springframework.boot.ide.product.e414/pom.xml b/eclipse-distribution/org.springframework.boot.ide.product.e414/pom.xml index 24c19f32a..6530c6489 100644 --- a/eclipse-distribution/org.springframework.boot.ide.product.e414/pom.xml +++ b/eclipse-distribution/org.springframework.boot.ide.product.e414/pom.xml @@ -132,6 +132,7 @@ 1.7 + osx-app-signing package @@ -147,10 +148,11 @@ + - + @@ -161,6 +163,7 @@ + osx-dmg-creation verify @@ -197,7 +200,7 @@ - + @@ -208,6 +211,29 @@ + + + osx-dmg-notarizing + verify + + ${skip.osx.notarizing} + + + + + + + + + + + + + + run + + + upload-product-bundles deploy