2 # Publishes artifacts from a Travis CI build.
4 # Copyright (C) 2019 Peter Wu <peter@lekensteyn.nl>
5 # SPDX-License-Identifier: GPL-2.0-or-later
7 # Currently it dumps a base64-encoded xz-compressed tarball as Travis CI
8 # does not have a nice way to publish artifacts (like Gitlab does).
12 files
=(*screenshot.png
)
14 if [ ${#files[@]} -eq 0 ]; then
15 echo "No artifacts found"
20 tar -cJvf "$output" "${files[@]}"
22 # Print some details for an integrity check.
24 openssl dgst
-sha256 "$output"
26 # Upload to other services just in case the log output is corrupted.
27 curl
-F 'f:1=<-' ix.io
< "$output"
29 # Dump the contents to the log (note: Travis has a 4MiB limit)
31 base64 -d > $output <<ARTIFACTS_BASE64
32 $(base64 < "$output" | tr -d '\n' | fold -w200)