Skip to content

Commit

Permalink
Make versioning always show diff from last tag to current commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mortbopet committed Jul 29, 2021
1 parent 37c6daf commit f0b60da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/scripts/set_version.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#!/bin/bash

set -e
if ([ "${GITHUB_REF##*/}" = "master" ]) then
export RIPES_VERSION=continuous
else
# get tag name and convert '/' to '-'
export RIPES_VERSION=$(echo ${GITHUB_REF#refs/*/} | sed -e 's/\//-/g')
fi
# Get the last tag which is not the top-of-head continuous tag
export RIPES_VERSION=$(git describe --tags --exclude "continuous")
2 changes: 1 addition & 1 deletion src/version/version.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set(ENV{GIT_DIR} ${RIPES_SRC_DIR}/.git)
execute_process(COMMAND git describe --tags
execute_process(COMMAND git describe --tags --exclude "continuous"
OUTPUT_VARIABLE GIT_REV
ERROR_QUIET)

Expand Down

0 comments on commit f0b60da

Please sign in to comment.