diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2019-12-19 15:18:12 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2020-01-08 11:46:27 +0100 |
| commit | 5b995c47666ade2419a294160af784c15929e020 (patch) | |
| tree | 2acfd309bceec6a2f199a6e9b5e39ac115a39e42 | |
| parent | ba84fc113845a696c9218514b8722b22ad247f22 (diff) | |
| download | mullvadvpn-5b995c47666ade2419a294160af784c15929e020.tar.xz mullvadvpn-5b995c47666ade2419a294160af784c15929e020.zip | |
Upload PDB debugging files
| -rwxr-xr-x | ci/buildserver-build.sh | 24 | ||||
| -rwxr-xr-x | ci/buildserver-upload.sh | 13 |
2 files changed, 34 insertions, 3 deletions
diff --git a/ci/buildserver-build.sh b/ci/buildserver-build.sh index b82dff1c52..726a3f387e 100755 --- a/ci/buildserver-build.sh +++ b/ci/buildserver-build.sh @@ -20,6 +20,7 @@ shopt -s nullglob SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" BUILD_DIR="$SCRIPT_DIR/mullvadvpn-app" LAST_BUILT_DIR="$SCRIPT_DIR/last-built" +PDB_DIR="$SCRIPT_DIR/pdb" UPLOAD_DIR="/home/upload/upload" BRANCHES_TO_BUILD=("origin/master") @@ -65,7 +66,6 @@ sign_win() { } upload() { - current_hash=$1 for f in MullvadVPN-*.{deb,rpm,exe,pkg,apk}; do sha256sum "$f" > "$f.sha256" case "$(uname -s)" in @@ -82,6 +82,15 @@ upload() { done } +upload_pdb() { + current_hash=$1 + f="pdb-$current_hash.tar.xz" + + sha256sum "$f" > "$f.sha256" + upload_sftp "$f" || return 1 + upload_sftp "$f.sha256" || return 1 +} + build_ref() { ref=$1 @@ -123,7 +132,11 @@ build_ref() { MINGW*|MSYS_NT*) sign_win || return 0 echo "Packaging all PDB files..." - find ./windows/ ./target/release/mullvad-daemon.pdb ./target/release/mullvad.pdb ./target/release/mullvad-problem-report.pdb -iname "*.pdb" | tar -cJf $SCRIPT_DIR/pdb/$current_hash.tar.xz -T - + find ./windows/ \ + ./target/release/mullvad-daemon.pdb \ + ./target/release/mullvad.pdb \ + ./target/release/mullvad-problem-report.pdb \ + -iname "*.pdb" | tar -cJf $PDB_DIR/pdb-$current_hash.tar.xz -T - ;; Linux*) echo "Building Android APK" @@ -131,7 +144,12 @@ build_ref() { ;; esac - (cd dist/ && upload $current_hash) || return 0 + (cd dist/ && upload) || return 0 + case "$(uname -s)" in + MINGW*|MSYS_NT*) + (cd "$PDB_DIR" && upload_pdb $current_hash) || return 0 + ;; + esac touch "$LAST_BUILT_DIR/$current_hash" echo "Successfully finished build at $(date)" } diff --git a/ci/buildserver-upload.sh b/ci/buildserver-upload.sh index 20ef1e8618..970a529f9b 100755 --- a/ci/buildserver-upload.sh +++ b/ci/buildserver-upload.sh @@ -26,4 +26,17 @@ while true; do scp -pB "$f.asc" build.mullvad.net:app/$version/ || true yes | rm "$f" "$f_checksum" "$f.asc" done + for f_checksum in pdb-*.sha256; do + sleep 1 + f="${f_checksum/.sha256/}" + if ! sha256sum --quiet -c "$f_checksum"; then + echo "Failed to verify checksum for $f" + continue + fi + + ssh build.mullvad.net mkdir -p app/pdb || continue + scp -pB "$f" build.mullvad.net:app/pdb/ || continue + + yes | rm "$f" "$f_checksum" + done done |
