Added github-release integration so binaries are downloadable from the github releases page
This commit is contained in:
+34
-1
@@ -24,6 +24,7 @@ UPDATE_ZIP_URLS="http://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAM
|
||||
UPDATE_MANIFEST_URLS="http://updates.duplicati.com/${RELEASE_TYPE}/latest.manifest;http://alt.updates.duplicati.com/${RELEASE_TYPE}/latest.manifest"
|
||||
UPDATER_KEYFILE="${HOME}/Dropbox/Privat/Duplicati-updater-release.key"
|
||||
GPG_KEYFILE="${HOME}/Dropbox/Privat/Duplicati-updater-gpgkey.key"
|
||||
GITHUB_TOKEN_FILE="${HOME}/.config/github-api-token"
|
||||
XBUILD=/Library/Frameworks/Mono.framework/Commands/xbuild
|
||||
GPG=/usr/local/bin/gpg2
|
||||
|
||||
@@ -60,7 +61,7 @@ echo -n "Enter keyfile password: "
|
||||
read -s KEYFILE_PASSWORD
|
||||
echo
|
||||
|
||||
RELEASE_CHANGEINFO_NEWS=`cat ${RELEASE_CHANGELOG_NEWS_FILE}`
|
||||
RELEASE_CHANGEINFO_NEWS=`cat "${RELEASE_CHANGELOG_NEWS_FILE}"`
|
||||
|
||||
git stash save "${GIT_STASH_NAME}"
|
||||
|
||||
@@ -175,6 +176,38 @@ git add "Updates/build_version.txt"
|
||||
git add "${RELEASE_CHANGELOG_FILE}"
|
||||
git commit -m "Version bump to v${RELEASE_VERSION}-${RELEASE_NAME}" -m "You can download this build from: " -m "Binaries: http://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip" -m "Signature file: http://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip.sig" -m "ASCII signature file: http://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip.sig.asc" -m "MD5: ${ZIP_MD5}" -m "SHA1: ${ZIP_SHA1}" -m "SHA256: ${ZIP_SHA256}"
|
||||
git tag "v${RELEASE_VERSION}-${RELEASE_NAME}" -m "You can download this build from: " -m "Binaries: http://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip" -m "Signature file: http://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip.sig" -m "ASCII signature file: http://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip.sig.asc" -m "MD5: ${ZIP_MD5}" -m "SHA1: ${ZIP_SHA1}" -m "SHA256: ${ZIP_SHA256}"
|
||||
git push --tags
|
||||
|
||||
PRE_RELEASE_LABEL="--pre-release"
|
||||
if [ "${RELEASE_TYPE}" == "stable" ]; then
|
||||
PRE_RELEASE_LABEL=""
|
||||
fi
|
||||
|
||||
RELEASE_MESSAGE=`echo "Changes: {RELEASE_CHANGEINFO_NEWS}\n\nBinaries: http://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip\nSignature file: http://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip.sig\nASCII signature file: http://updates.duplicati.com/${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip.sig.asc\nMD5: ${ZIP_MD5}\nSHA1: ${ZIP_SHA1}\nSHA256: ${ZIP_SHA256}"`
|
||||
|
||||
# Using the tool from https://github.com/aktau/github-release
|
||||
|
||||
GITHUB_TOKEN=`cat "${GITHUB_TOKEN_FILE}"`
|
||||
|
||||
if [ "x${GITHUB_TOKEN}" == "x" ]; then
|
||||
echo "No GITHUB_TOKEN found in environment, you can manually upload the binaries"
|
||||
else
|
||||
github-release release ${PRE_RELEASE_LABEL} \
|
||||
--tag "v${RELEASE_VERSION}-${RELEASE_NAME}" \
|
||||
--name "v${RELEASE_VERSION}-${RELEASE_NAME}" \
|
||||
--repo "duplicati" \
|
||||
--user "duplicati" \
|
||||
--security-token "${GITHUB_TOKEN}" \
|
||||
--description "${RELEASE_MESSAGE}" \
|
||||
|
||||
github-release upload \
|
||||
--tag "v${RELEASE_VERSION}-${RELEASE_NAME}" \
|
||||
--name "${RELEASE_TYPE}/${RELEASE_FILE_NAME}.zip" \
|
||||
--repo "duplicati" \
|
||||
--user "duplicati" \
|
||||
--security-token "${GITHUB_TOKEN}" \
|
||||
--file "${UPDATE_TARGET}/${RELEASE_FILE_NAME}.zip"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Built ${RELEASE_TYPE} version: ${RELEASE_VERSION} - ${RELEASE_NAME}"
|
||||
|
||||
Reference in New Issue
Block a user