diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-01-25 17:18:12 +0100 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-01-25 18:27:25 +0100 |
commit | 302dbc2df4e55855d1c9a97f679101e9d40a260e (patch) | |
tree | c34885c5d3a75723bcf9a32872c4934a40a817d4 | |
parent | 37fde3d877b162e8867416bd1d70ee0808976620 (diff) | |
download | libquotient-302dbc2df4e55855d1c9a97f679101e9d40a260e.tar.gz libquotient-302dbc2df4e55855d1c9a97f679101e9d40a260e.zip |
Make quotest origin even more informative
-rw-r--r-- | .github/workflows/ci.yml | 9 |
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 |