diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
commit | e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch) | |
tree | 68cb5ef9081156392f1dd62a00c6ccc1451b93df /test/travis-upload-artifacts.sh | |
parent | Initial commit. (diff) | |
download | wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip |
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/travis-upload-artifacts.sh')
-rwxr-xr-x | test/travis-upload-artifacts.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/travis-upload-artifacts.sh b/test/travis-upload-artifacts.sh new file mode 100755 index 00000000..6f96b118 --- /dev/null +++ b/test/travis-upload-artifacts.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Publishes artifacts from a Travis CI build. +# +# Copyright (C) 2019 Peter Wu <peter@lekensteyn.nl> +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Currently it dumps a base64-encoded xz-compressed tarball as Travis CI +# does not have a nice way to publish artifacts (like Gitlab does). +# + +shopt -s nullglob +files=(*screenshot.png) + +if [ ${#files[@]} -eq 0 ]; then + echo "No artifacts found" + exit +fi + +output=travis.tar.xz +tar -cJvf "$output" "${files[@]}" + +# Print some details for an integrity check. +ls -l "$output" +openssl dgst -sha256 "$output" + +# Upload to other services just in case the log output is corrupted. +curl -F 'f:1=<-' ix.io < "$output" + +# Dump the contents to the log (note: Travis has a 4MiB limit) +cat <<EOF +base64 -d > $output <<ARTIFACTS_BASE64 +$(base64 < "$output" | tr -d '\n' | fold -w200) +ARTIFACTS_BASE64 +EOF |