Skip to content

Commit

Permalink
hide git hash for stable releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsm committed Aug 26, 2024
1 parent 4f8a7aa commit 7a42df0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
id: read_version
run: |
if [ "${{github.ref_type}}" == "tag" ]; then
VERSION=$(cat VERSION)
VERSION=${{ github.ref_name }}
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "version=$VERSION" >> $GITHUB_OUTPUT
else
VERSION=${{env.CI_VERSION}}
VERSION=${{ env.CI_VERSION }}
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "version=$VERSION" >> $GITHUB_OUTPUT
fi
Expand Down
12 changes: 7 additions & 5 deletions qucs/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,16 @@

QString misc::getWindowTitle()
{
QString title = QUCS_NAME " " PACKAGE_VERSION;
QString title = QString("%1 %2").arg(QUCS_NAME,PACKAGE_VERSION);
if (title.endsWith(".0")) {
title.chop(2);
}
#if defined(GIT)
QString hash = GIT;
if (!hash.isEmpty()) {
title = title + "-" + hash;
#if defined(GIT) && defined(CI_VERSION)
if (title.endsWith(".99")) {
QString hash = GIT;
if (!hash.isEmpty()) {
title.append("-").append(hash);
}
}
#endif

Expand Down

0 comments on commit 7a42df0

Please sign in to comment.