Skip to content

Commit 841a4ac

Browse files
committed
update release script to update git information
1 parent 391607c commit 841a4ac

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ jobs:
2424

2525
steps:
2626
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
27+
with:
28+
fetch-tags: true
29+
30+
# - name: Refresh Git Information
31+
# if: startsWith(github.ref, 'refs/tags/')
32+
# shell: bash
33+
# run: |
34+
# git fetch --force --tags
35+
# git checkout "${GITHUB_REF_NAME}"
2736

2837
- name: Create Build Directory
2938
run: cmake -E make_directory ./build

cliloader/cliloader.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ static bool parseArguments(int argc, char *argv[])
583583
std::string defaultDumpDir = getDefaultDumpDirectory();
584584
fprintf(stdout,
585585
"cliloader - A utility to simplify using the Intercept Layer for OpenCL Applications\n"
586-
" Version: %s, from %s\n"
586+
" Version: %s%s%s\n"
587587
"\n"
588588
"Usage: cliloader [OPTIONS] COMMAND\n"
589589
"\n"
@@ -630,7 +630,8 @@ static bool parseArguments(int argc, char *argv[])
630630
" %s\n"
631631
"\n",
632632
g_scGitDescribe,
633-
g_scGitRefSpec,
633+
strlen(g_scGitRefSpec) > 0 ? ", from " : "",
634+
strlen(g_scGitRefSpec) > 0 ? g_scGitRefSpec : "",
634635
defaultDumpDir.c_str(),
635636
g_scURL );
636637
return false;

cliprof/cliprof.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static bool parseArguments(int argc, char *argv[])
284284
{
285285
fprintf(stdout,
286286
"cliprof - A simple utility to enable profiling using the Intercept Layer for OpenCL Applications\n"
287-
" Version: %s, from %s\n"
287+
" Version: %s%s%s\n"
288288
"\n"
289289
"Usage: cliprof [OPTIONS] COMMAND\n"
290290
"\n"
@@ -298,7 +298,8 @@ static bool parseArguments(int argc, char *argv[])
298298
" %s\n"
299299
"\n",
300300
g_scGitDescribe,
301-
g_scGitRefSpec,
301+
strlen(g_scGitRefSpec) > 0 ? ", from " : "",
302+
strlen(g_scGitRefSpec) > 0 ? g_scGitRefSpec : "",
302303
g_scURL );
303304
return false;
304305
}

0 commit comments

Comments
 (0)