From 6ddd28521568b75d49a53d6c0d598b7d393ba6b2 Mon Sep 17 00:00:00 2001 From: Martin Lippert Date: Wed, 6 Nov 2019 13:10:42 +0100 Subject: [PATCH] add macos notarization to e413 build as a first step --- .../macos-notarize.sh | 31 +++++++++++++++++++ .../pom.xml | 29 +++++++++++++++-- eclipse-distribution/pom.xml | 3 +- 3 files changed, 60 insertions(+), 3 deletions(-) create mode 100755 eclipse-distribution/org.springframework.boot.ide.product.e413/macos-notarize.sh diff --git a/eclipse-distribution/org.springframework.boot.ide.product.e413/macos-notarize.sh b/eclipse-distribution/org.springframework.boot.ide.product.e413/macos-notarize.sh new file mode 100755 index 000000000..d6f812b18 --- /dev/null +++ b/eclipse-distribution/org.springframework.boot.ide.product.e413/macos-notarize.sh @@ -0,0 +1,31 @@ +#!/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" + +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.e413/pom.xml b/eclipse-distribution/org.springframework.boot.ide.product.e413/pom.xml index 24c19f32a..92857d559 100644 --- a/eclipse-distribution/org.springframework.boot.ide.product.e413/pom.xml +++ b/eclipse-distribution/org.springframework.boot.ide.product.e413/pom.xml @@ -132,6 +132,7 @@ 1.7 + osx-app-signing package @@ -150,7 +151,7 @@ - + @@ -161,6 +162,7 @@ + osx-dmg-creation verify @@ -197,7 +199,7 @@ - + @@ -208,6 +210,29 @@ + + + osx-dmg-notarizing + verify + + ${skip.osx.notarizing} + + + + + + + + + + + + + + run + + + upload-product-bundles deploy diff --git a/eclipse-distribution/pom.xml b/eclipse-distribution/pom.xml index cf981a9b6..9d7edf194 100644 --- a/eclipse-distribution/pom.xml +++ b/eclipse-distribution/pom.xml @@ -55,8 +55,9 @@ pivotal ~/.keytool/pivotal.jks - + true + true Spring Tool Suite 4