From 28f3cd57aab4bf77d67ba0d225f8d48f8380d17f Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Wed, 14 Mar 2018 02:19:53 +0100 Subject: CI/AppVeyor: Push link to latest build artifact to http://alpha.inkscape.org/snapshots/ --- buildtools/appveyor.sh | 17 ++++++++++++++++- buildtools/appveyor_redirect_template.html | 11 +++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 buildtools/appveyor_redirect_template.html diff --git a/buildtools/appveyor.sh b/buildtools/appveyor.sh index 185feee0c..649de66ba 100644 --- a/buildtools/appveyor.sh +++ b/buildtools/appveyor.sh @@ -90,4 +90,19 @@ then ninja dist-win-all else ninja dist-win-7z-fast -fi \ No newline at end of file +fi + +# create redirect to the 7z archive we just created (and are about to upload as an artifact) +FILENAME=$(ls inkscape*.7z) +URL=https://ci.appveyor.com/api/buildjobs/$APPVEYOR_JOB_ID/artifacts/build%2F$FILENAME +BRANCH=$APPVEYOR_REPO_BRANCH +HTMLNAME=latest_${BRANCH}_x${MSYSTEM#MINGW}.html +sed -e "s#\${FILENAME}#${FILENAME}#" -e "s#\${URL}#${URL}#" -e "s#\${BRANCH}#${BRANCH}#" ../buildtools/appveyor_redirect_template.html > $HTMLNAME +# upload redirect to http://alpha.inkscape.org/snapshots/ +if [ "${APPVEYOR_REPO_NAME}" == "inkscape/inkscape" ] && [ -n "${SSH_KEY}" ]; then + if [ "$BRANCH" == "master" ] || [ "$BRANCH" == "0.92.x" ]; then + echo -e "-----BEGIN RSA PRIVATE KEY-----\n${SSH_KEY}\n-----END RSA PRIVATE KEY-----" > ssh_key + scp -oStrictHostKeyChecking=no -i ssh_key $HTMLNAME appveyor-ci@alpha.inkscape.org:/var/www/alpha.inkscape.org/public_html/snapshots/ + rm -f ssh_key + fi +fi diff --git a/buildtools/appveyor_redirect_template.html b/buildtools/appveyor_redirect_template.html new file mode 100644 index 000000000..04ede943b --- /dev/null +++ b/buildtools/appveyor_redirect_template.html @@ -0,0 +1,11 @@ + + + + + + Redirecting... + + + Redirecting to latest build of '${BRANCH}' branch. If you're not redirected automatically, use this direct link: ${FILENAME} + + -- cgit v1.2.3