File tree Expand file tree Collapse file tree 3 files changed +9
-22
lines changed
Expand file tree Collapse file tree 3 files changed +9
-22
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,6 @@ on: workflow_dispatch
55jobs :
66 semantic-release :
77 runs-on : ubuntu-latest
8- environment :
9- name : pypi
10- url : https://pypi.org/p/trame-slicer
118 permissions :
129 id-token : write # IMPORTANT: mandatory for trusted publishing
1310 contents : write # IMPORTANT: mandatory for making GitHub Releases
2522 github_token : ${{ secrets.GITHUB_TOKEN }}
2623 changelog : true
2724 build : false # build is too complex to be handled by semantic release
25+ config_file : releaserc.toml
Original file line number Diff line number Diff line change @@ -13,26 +13,10 @@ find_package(Slicer REQUIRED)
1313include (${Slicer_USE_FILE} )
1414
1515#-----------------------------------------------------------------------------
16- # Extension version
17- find_program (GIT_EXECUTABLE NAMES git REQUIRED )
18- execute_process (
19- COMMAND "${GIT_EXECUTABLE} " "describe" "--tags" "--abbrev=0" "--match" "v[0-9]*"
20- RESULT_VARIABLE git_code
21- OUTPUT_VARIABLE git_stdout
22- ERROR_VARIABLE git_stderr
23- )
16+ # Extension version (auto updated by semantic version)
17+ set (LayerDM_VERSION "v0.0.0" )
2418
25- if (NOT git_code EQUAL 0)
26- message (FATAL_ERROR "Failed to determined project version using Git.\n "
27- "GIT_EXECUTABLE: ${GIT_EXECUTABLE} \n "
28- "Return Code: ${git_code} \n "
29- "Standard error:\n ${git_stdout} \n "
30- "Standard error:\n ${git_stderr} \n "
31- )
32- endif ()
33-
34- string (STRIP "${git_stdout} " git_stdout) # git output will end with a newline
35- string (SUBSTRING "${git_stdout} " 1 -1 LayerDM_VERSION) # remove first character
19+ string (SUBSTRING "${LayerDM_VERSION} " 1 -1 LayerDM_VERSION) # remove first character
3620string (REPLACE "." ";" version_components "${LayerDM_VERSION} " ) # this creates a list
3721list (GET version_components 0 LayerDM_VERSION_MAJOR)
3822list (GET version_components 1 LayerDM_VERSION_MINOR)
Original file line number Diff line number Diff line change 1+ [semantic_release ]
2+ tag_format = " v{version}"
3+ version_variables = [
4+ " extension.cmake:LayerDM_VERSION:tf"
5+ ]
You can’t perform that action at this time.
0 commit comments