Skip to content

Commit

Permalink
Merge branch 'add-platform-to-checksums-file'
Browse files Browse the repository at this point in the history
  • Loading branch information
raksooo committed Oct 17, 2023
2 parents e166916 + deb2650 commit b6cc9a0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ci/buildserver-build-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function upload {
version=$1

files=( * )
checksums_path="$version+$(hostname).sha256"
checksums_path="android+$(hostname)+$version.sha256"
sha256sum "${files[@]}" > "$checksums_path"

mv "${files[@]}" "$checksums_path" "$UPLOAD_DIR/"
Expand Down
2 changes: 1 addition & 1 deletion ci/buildserver-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function upload {
version=$1

files=( * )
checksums_path="$version+$(hostname).sha256"
checksums_path="desktop+$(hostname)+$version.sha256"
sha256sum "${files[@]}" > "$checksums_path"

case "$(uname -s)" in
Expand Down
10 changes: 5 additions & 5 deletions ci/buildserver-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ while true; do
for checksums_path in *.sha256; do
sleep 1

# Strip everything from the last "+" in the file name to only keep the version and tag (if
# present).
version="${checksums_path%+*}"
# Parse the platform name and version out of the filename of the checksums file.
platform="$(echo "$checksums_path" | cut -d + -f 1)"
version="$(echo "$checksums_path" | cut -d + -f 3,4 | sed 's/\.sha256//')"
if ! sha256sum --quiet -c "$checksums_path"; then
echo "Failed to verify checksums for $version"
continue
fi

if [[ $version == *"-dev-"* ]]; then
upload_path="builds"
upload_path="$platform/builds"
else
upload_path="releases"
upload_path="$platform/releases"
fi

files=$(awk '{print $2}' < "$checksums_path")
Expand Down

0 comments on commit b6cc9a0

Please sign in to comment.