Skip to content
Snippets Groups Projects
Commit 1695ab67 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

in stable releases, link to gitlab files with the corresponding tag

parent fbb12a0f
No related branches found
No related tags found
No related merge requests found
......@@ -126,6 +126,13 @@ set(GMSH_SHORT_VERSION
set(GMSH_VERSION "${GMSH_SHORT_VERSION}${GMSH_EXTRA_VERSION}")
set(GMSH_SHORT_LICENSE "GNU General Public License")
set(GMSH_GITLAB_PREFIX "https://gitlab.onelab.info/gmsh/gmsh")
if(GMSH_RELEASE)
set(GMSH_GITLAB_PREFIX "${GMSH_GITLAB_PREFIX}/blob/gmsh_${GMSH_SHORT_VERSION}")
else()
set(GMSH_GITLAB_PREFIX "${GMSH_GITLAB_PREFIX}/blob/master")
endif()
set(GMSH_API api/gmsh.h api/gmshc.h api/gmsh.h_cwrap)
if(ENABLE_PRIVATE_API)
......
......@@ -1600,13 +1600,12 @@ class API:
cpp = find_function('C++', path + '/' + name, cpp_data)
py = find_function('Python', path + '/' + name, py_data)
def write_matches(lang, matches, max_matches):
git = 'https://gitlab.onelab.info/gmsh/gmsh/tree/master/'
f.write(lang + ' (')
for i in range(min(max_matches,
len(matches))): # write max 5 matches
if i > 0: f.write(', ')
f.write('@url{' + git + matches[i][0][3:] + '#L' +
str(matches[i][1]) + ',' +
f.write('@url{@value{GITLAB-PREFIX}/' + matches[i][0][3:] +
'#L' + str(matches[i][1]) + ',' +
os.path.basename(matches[i][0]) + '}')
if len(matches) > max_matches: f.write(', ...')
f.write(')')
......
This diff is collapsed.
This diff is collapsed.
@c This file was generated by cmake: do not edit manually!
@set GMSH-VERSION 4.6.1 (development version)
@set GITLAB-PREFIX https://gitlab.onelab.info/gmsh/gmsh/blob/master
@c This file was generated by cmake: do not edit manually!
@set GMSH-VERSION ${GMSH_MAJOR_VERSION}.${GMSH_MINOR_VERSION}.${GMSH_PATCH_VERSION} ${GMSH_EXTRA_VERSION_TEXI}
@set GITLAB-PREFIX ${GMSH_GITLAB_PREFIX}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment