Skip to content

Commit 659014d

Browse files
committed
Merge branch 'improve-browser-download-script'
2 parents 9b24cd4 + 31b059e commit 659014d

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

ci/linux-repository-builder/build-linux-repositories.sh

+4
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ function rsync_repo {
135135
local remote_repo_dir=$2
136136

137137
echo "Syncing to $repository_server_upload_domain:$remote_repo_dir"
138+
# We have an issue where the rsync can fail due to the remote dir being locked (only one rsync at a time allowed)
139+
# We suspect this is because of too fast subsequent invocations of rsync to the same target dir. With a hacky sleep
140+
# we hope to avoid this issue for now.
141+
sleep 10
138142
rsync -av --delete --mkpath --rsh='ssh -p 1122' \
139143
"$local_repo_dir"/ \
140144
build@"$repository_server_upload_domain":"$remote_repo_dir"

ci/mullvad-browser/download-mullvad-browser.sh

+8-3
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ function main() {
3939
echo "[#] Downloading $PACKAGE_FILENAME.asc"
4040
if ! wget --quiet "$SIGNATURE_URL"; then
4141
echo "[!] Failed to download $SIGNATURE_URL"
42+
rm "$PACKAGE_FILENAME"
4243
exit 1
4344
fi
4445

4546
echo "[#] Verifying $PACKAGE_FILENAME signature"
46-
if ! gpg --verify "$PACKAGE_FILENAME".asc; then
47+
if ! gpg --verify "$PACKAGE_FILENAME".asc "$PACKAGE_FILENAME"; then
4748
echo "[!] Failed to verify signature"
4849
rm "$PACKAGE_FILENAME" "$PACKAGE_FILENAME.asc"
4950
exit 1
@@ -63,8 +64,6 @@ function main() {
6364
return
6465
fi
6566

66-
echo "[#] $PACKAGE_FILENAME has changed"
67-
cp "$PACKAGE_FILENAME" "$WORKDIR/"
6867
# Leaving a file in `$TMP_DIR` is used as an indicator further down that something changed
6968
}
7069

@@ -104,7 +103,13 @@ if [[ -z "$(ls -A "$TMP_DIR")" ]]; then
104103
exit
105104
fi
106105

106+
echo ""
107107
echo "[#] New browser build(s) exist"
108+
for package in *; do
109+
echo "[#] $package has changed"
110+
mv "$package" "$WORKDIR/"
111+
done
112+
108113
for repository in "${REPOSITORIES[@]}"; do
109114
inbox_dir="$NOTIFY_DIR/$repository"
110115

0 commit comments

Comments
 (0)