mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-05-02 03:26:06 -05:00
Some checks failed
Build Desktop / Configure (push) Has been cancelled
Build Docker Image / amd64 & arm64 (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (Debian, DEB, 11) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (Debian, DEB, 13) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (Debian, DEB, skip, 12) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (Fedora, RPM, 43) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (Fedora, RPM, skip, 42) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (Servatrice_Debian, DEB, yes, skip, 11) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (Ubuntu, DEB, 22.04) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (Ubuntu, DEB, 24.04) (push) Has been cancelled
Build Desktop / ${{matrix.distro}} ${{matrix.version}} (yes, Arch, skip) (push) Has been cancelled
Build Desktop / ${{matrix.os}} ${{matrix.target}}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }} (Ninja, 1, macOS, -macOS14, clang_64, qtimageformats qtmultimedia qtwebsockets, 6.10.*, macos-14, Apple, 14, Release, 1, 15.4) (push) Has been cancelled
Build Desktop / ${{matrix.os}} ${{matrix.target}}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }} (Ninja, 1, macOS, -macOS15, clang_64, qtimageformats qtmultimedia qtwebsockets, 6.10.*, macos-15, Apple, 15, Release, 1, 16.4) (push) Has been cancelled
Build Desktop / ${{matrix.os}} ${{matrix.target}}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }} (Ninja, 1, macOS, 13, -macOS13_Intel, clang_64, qtimageformats qtmultimedia qtwebsockets, 6.10.*, macos-15-intel, Intel, 13, … (push) Has been cancelled
Build Desktop / ${{matrix.os}} ${{matrix.target}}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }} (Ninja, macOS, clang_64, qtimageformats qtmultimedia qtwebsockets, 6.10.*, macos-15, Apple, 15, Debug, 1, 16.4) (push) Has been cancelled
Build Desktop / ${{matrix.os}} ${{matrix.target}}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }} (Visual Studio 17 2022, x64, 1, Windows, -Win10, win64_msvc2022_64, qtimageformats qtmultimedia qtwebsockets, 6.10.*, windows… (push) Has been cancelled
* Cleanup vcpkg matrix * Add filename with extension as output * fix name -> fullname, cleanup
50 lines
1.3 KiB
Bash
Executable File
50 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# used by the ci to rename build artifacts
|
|
# renames the file to [original name][SUFFIX].[original extension]
|
|
# where SUFFIX is either available in the environment or as the first arg
|
|
# expected to be run in the build directory unless BUILD_DIR is set
|
|
# adds output to GITHUB_OUTPUT
|
|
builddir="${BUILD_DIR:=.}"
|
|
findrx="Cockatrice-*.*"
|
|
|
|
if [[ $1 ]]; then
|
|
SUFFIX="$1"
|
|
fi
|
|
|
|
# check env
|
|
if [[ ! $SUFFIX ]]; then
|
|
echo "::error file=$0::SUFFIX is missing"
|
|
exit 2
|
|
fi
|
|
|
|
set -e
|
|
|
|
# find file
|
|
found="$(find "$builddir" -maxdepth 1 -type f -name "$findrx" -print -quit)"
|
|
path="${found%/*}" # remove all including first "/" from right side
|
|
file="${found##*/}" # remove all including last "/" from left side
|
|
if [[ ! $file ]]; then
|
|
echo "::error file=$0::could not find package"
|
|
exit 1
|
|
fi
|
|
oldpwd="$PWD"
|
|
if ! cd "$path"; then
|
|
echo "::error file=$0::could not get file path"
|
|
exit 1
|
|
fi
|
|
|
|
# set filename
|
|
name="${file%.*}" # remove all including first "." from right side
|
|
new_name="$name$SUFFIX"
|
|
extension="${file##*.}" # remove all including last "." from left side
|
|
filename="$new_name.$extension"
|
|
echo "renaming '$file' to '$filename'"
|
|
mv "$file" "$filename"
|
|
|
|
cd "$oldpwd"
|
|
relative_path="$path/$filename"
|
|
ls -l "$relative_path"
|
|
echo "path=$relative_path" >>"$GITHUB_OUTPUT"
|
|
echo "name=$new_name" >>"$GITHUB_OUTPUT"
|
|
echo "fullname=$filename" >>"$GITHUB_OUTPUT"
|