Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Skovhede <kenneth@hexad.dk>2016-10-19 15:32:18 +0300
committerKenneth Skovhede <kenneth@hexad.dk>2016-10-19 15:32:18 +0300
commit9bb0be82b72e2c22652918419bc423d632727513 (patch)
treef3d5044a72190f72d6d4bb335dcfec82088c8e6a /build-installers.sh
parentd511135e83cb27d27da85d07a83a21a0dbbcc4e4 (diff)
Simplified building the installers so the signature file can be uploaded after the build has completed.
Diffstat (limited to 'build-installers.sh')
-rwxr-xr-xbuild-installers.sh31
1 files changed, 15 insertions, 16 deletions
diff --git a/build-installers.sh b/build-installers.sh
index 9af8542be..ab50587f5 100755
--- a/build-installers.sh
+++ b/build-installers.sh
@@ -36,6 +36,7 @@ MSI32NAME="duplicati-${BUILDTAG_RAW}-x86.msi"
DMGNAME="duplicati-${BUILDTAG_RAW}.dmg"
PKGNAME="duplicati-${BUILDTAG_RAW}.pkg"
SPKNAME="duplicati-${BUILDTAG_RAW}.spk"
+SIGNAME="duplicati-${BUILDTAG_RAW}-signatures.zip"
UPDATE_TARGET="Updates/build/${BUILDTYPE}_target-${VERSION}"
@@ -382,40 +383,38 @@ if [ -d "./tmp" ]; then
rm -rf "./tmp"
fi
+SIG_FOLDER="duplicati-${BUILDTAG_RAW}-signatures"
mkdir tmp
-mkdir "./tmp/duplicati-${BUILDTAG_RAW}-signatures"
+mkdir "./tmp/${SIG_FOLDER}"
for FILE in "${SPKNAME}" "${RPMNAME}" "${DEBNAME}" "${DMGNAME}" "${PKGNAME}" "${MSI32NAME}" "${MSI64NAME}" "${ZIPFILE}"; do
- build_file_signatures "${UPDATE_TARGET}/${FILE}" "./tmp/duplicati-${BUILDTAG_RAW}-signatures/${FILE}"
+ build_file_signatures "${UPDATE_TARGET}/${FILE}" "./tmp/${SIG_FOLDER}/${FILE}"
done
if [ "z${GPGID}" != "z" ]; then
- echo "${GPGID}" > "./tmp/duplicati-${BUILDTAG_RAW}-signatures/sign-key.txt"
- echo "https://pgp.mit.edu/pks/lookup?op=get&search=${GPGID}" >> "./tmp/duplicati-${BUILDTAG_RAW}-signatures/sign-key.txt"
+ echo "${GPGID}" > "./tmp/${SIG_FOLDER}/sign-key.txt"
+ echo "https://pgp.mit.edu/pks/lookup?op=get&search=${GPGID}" >> "./tmp/${SIG_FOLDER}/sign-key.txt"
+fi
+
+if [ -f "${UPDATE_TARGET}/${SIGNAME}" ]; then
+ rm "${UPDATE_TARGET}/${SIGNAME}"
fi
cd tmp
-zip -r9 "./duplicati-${BUILDTAG_RAW}-signatures.zip" "./duplicati-${BUILDTAG_RAW}-signatures/"
+zip -r9 "./${SIGNAME}" "./${SIG_FOLDER}/"
cd ..
-rm -rf "./tmp/duplicati-${BUILDTAG_RAW}-signatures"
+mv "./tmp/${SIGNAME}" "${UPDATE_TARGET}/${SIGNAME}"
+rm -rf "./tmp/${SIG_FOLDER}"
-aws --profile=duplicati-upload s3 cp "./tmp/duplicati-${BUILDTAG_RAW}-signatures.zip" "s3://updates.duplicati.com/${BUILDTYPE}/duplicati-${BUILDTAG_RAW}-signatures.zip"
+aws --profile=duplicati-upload s3 cp "${UPDATE_TARGET}/${SIGNAME}" "s3://updates.duplicati.com/${BUILDTYPE}/${SIGNAME}"
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 upload \
- --tag "v${VERSION}-${BUILDTAG_RAW}" \
- --name "duplicati-${BUILDTAG_RAW}-signatures.zip" \
- --repo "duplicati" \
- --user "duplicati" \
- --security-token "${GITHUB_TOKEN}" \
- --file "./tmp/duplicati-${BUILDTAG_RAW}-signatures.zip"
-
- for FILE in "${SPKNAME}" "${RPMNAME}" "${DEBNAME}" "${DMGNAME}" "${PKGNAME}" "${MSI32NAME}" "${MSI64NAME}"; do
+ for FILE in "${SPKNAME}" "${RPMNAME}" "${DEBNAME}" "${DMGNAME}" "${PKGNAME}" "${MSI32NAME}" "${MSI64NAME}" "${SIGNAME}"; do
github-release upload \
--tag "v${VERSION}-${BUILDTAG_RAW}" \
--name "${FILE}" \