aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-01-25 17:18:12 +0100
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-01-25 18:27:25 +0100
commit302dbc2df4e55855d1c9a97f679101e9d40a260e (patch)
treec34885c5d3a75723bcf9a32872c4934a40a817d4
parent37fde3d877b162e8867416bd1d70ee0808976620 (diff)
downloadlibquotient-302dbc2df4e55855d1c9a97f679101e9d40a260e.tar.gz
libquotient-302dbc2df4e55855d1c9a97f679101e9d40a260e.zip
Make quotest origin even more informative
-rw-r--r--.github/workflows/ci.yml9
1 files changed, 8 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b69d34e7..946b3073 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -65,7 +65,14 @@ jobs:
echo "CC=clang" >>$GITHUB_ENV
echo "CXX=clang++" >>$GITHUB_ENV
fi
- echo "QUOTEST_ORIGIN=${{ github.ref }} @ ${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV
+ if grep -q 'refs/tags' <<<'${{ github.ref }}'; then
+ VERSION="$(git describe --tags)"
+ elif [ '${{ github.ref }}' == 'refs/heads/master' ]; then
+ VERSION="ci${{ github.run_number }}-$(git rev-parse --short HEAD)"
+ else
+ VERSION="$(git describe --all --contains)-ci${{ github.run_number }}-$(git rev-parse --short HEAD)"
+ fi
+ echo "QUOTEST_ORIGIN=$VERSION @ ${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV
echo "CMAKE_ARGS=-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=false \
-DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_PREFIX_PATH=~/.local" >>$GITHUB_ENV
cmake -E make_directory ${{ runner.workspace }}/build