Skip to content

Commit

Permalink
chore: identify version numbers using a git tag
Browse files Browse the repository at this point in the history
- remove VERSION file
- some smaller cleanups and warning fixes

Fixes #12349
  • Loading branch information
caybro committed Oct 29, 2024
1 parent ab92672 commit 6b4c9b1
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 11 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@ endif
NIM_PARAMS += --outdir:./bin

# App version
VERSIONFILE=VERSION
DESKTOP_VERSION=`cat $(VERSIONFILE)`
DESKTOP_VERSION=`git describe --tags`
STATUSGO_VERSION=`(cd vendor/status-go; git describe --tags --abbrev=0)`
NIM_PARAMS += -d:DESKTOP_VERSION="$(DESKTOP_VERSION)"
NIM_PARAMS += -d:STATUSGO_VERSION="$(STATUSGO_VERSION)"
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

2 changes: 1 addition & 1 deletion src/constants.nim
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const STATUSGO_VERSION* {.strdefine.} = "0.0.0"
# This is changed during compilation by executing git command
const GIT_COMMIT* {.strdefine.} = ""

const APP_VERSION* = if defined(production): DESKTOP_VERSION else: fmt("{GIT_COMMIT}")
const APP_VERSION* = DESKTOP_VERSION

const sep* = when defined(windows): "\\" else: "/"

Expand Down
2 changes: 1 addition & 1 deletion src/env_cli_vars.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os, sequtils, strutils, stew/shims/strformat, chronicles
import os, sequtils, strutils, chronicles

import app/global/feature_flags

Expand Down
2 changes: 1 addition & 1 deletion src/nim_status_client.nim
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ proc determineStatusAppIconPath(): string =
if defined(production):
return "/../status.png"

return "/../status-dev.png"
return "/../status-dev.png"

proc prepareLogging() =
# Outputs logs in the node tab
Expand Down
7 changes: 2 additions & 5 deletions ui/nim-status-client.pro
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ OTHER_FILES += $$files("$$PWD/../vendor/SortFilterProxyModel/*.h", true)

OTHER_FILES += $$files("$$PWD/../vendor/nimqml/src/*.nim", true)

OTHER_FILES += $$files("$$PWD/../Makefile")

# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH = $$PWD/imports \
$$PWD/StatusQ \
Expand All @@ -49,9 +51,4 @@ QML_IMPORT_PATH = $$PWD/imports \
# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH = $$PWD/imports

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += resources.qrc StatusQ/src/assets.qrc StatusQ/src/statusq.qrc

0 comments on commit 6b4c9b1

Please sign in to comment.