Skip to content

Commit

Permalink
update release script to update git information
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug committed Sep 27, 2024
1 parent 391607c commit 45cf66f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ jobs:

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# This isn't working currently, see https://github.com/actions/checkout/issues/1467.
# Instead, get the git information manually with the step below.
# with:
# fetch-tags: true

- name: Refresh Git Information
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
git fetch --force --tags
git checkout "${GITHUB_REF_NAME}"
- name: Create Build Directory
run: cmake -E make_directory ./build
Expand Down
5 changes: 3 additions & 2 deletions cliloader/cliloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ static bool parseArguments(int argc, char *argv[])
std::string defaultDumpDir = getDefaultDumpDirectory();
fprintf(stdout,
"cliloader - A utility to simplify using the Intercept Layer for OpenCL Applications\n"
" Version: %s, from %s\n"
" Version: %s%s%s\n"
"\n"
"Usage: cliloader [OPTIONS] COMMAND\n"
"\n"
Expand Down Expand Up @@ -630,7 +630,8 @@ static bool parseArguments(int argc, char *argv[])
" %s\n"
"\n",
g_scGitDescribe,
g_scGitRefSpec,
strlen(g_scGitRefSpec) > 0 ? ", from " : "",
strlen(g_scGitRefSpec) > 0 ? g_scGitRefSpec : "",
defaultDumpDir.c_str(),
g_scURL );
return false;
Expand Down
5 changes: 3 additions & 2 deletions cliprof/cliprof.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ static bool parseArguments(int argc, char *argv[])
{
fprintf(stdout,
"cliprof - A simple utility to enable profiling using the Intercept Layer for OpenCL Applications\n"
" Version: %s, from %s\n"
" Version: %s%s%s\n"
"\n"
"Usage: cliprof [OPTIONS] COMMAND\n"
"\n"
Expand All @@ -298,7 +298,8 @@ static bool parseArguments(int argc, char *argv[])
" %s\n"
"\n",
g_scGitDescribe,
g_scGitRefSpec,
strlen(g_scGitRefSpec) > 0 ? ", from " : "",
strlen(g_scGitRefSpec) > 0 ? g_scGitRefSpec : "",
g_scURL );
return false;
}
Expand Down

0 comments on commit 45cf66f

Please sign in to comment.