Issue #143: Support TUI Branding during compilation

This commit is contained in:
Berger Eugene 2024-03-02 19:00:13 +02:00
parent 1eba53f748
commit 14ada1c8d1
3 changed files with 13 additions and 8 deletions

View File

@ -7,10 +7,13 @@ DATE ?= $(shell TZ=UTC0 git show --quiet --date='format-local:%Y-%m-%dT%H:
NUMVER = $(shell echo ${VERSION} | cut -d"v" -f 2)
PKG = github.com/f1bonacc1/${NAME}
SHELL := /bin/bash
PROJ_NAME := Process Compose
LD_FLAGS := -ldflags="-X ${PKG}/src/config.Version=${VERSION} \
-X ${PKG}/src/config.CheckForUpdates=true \
-X ${PKG}/src/config.Commit=${GIT_REV} \
-X ${PKG}/src/config.Date=${DATE} \
-X '${PKG}/src/config.ProjectName=${PROJ_NAME} 🔥' \
-X '${PKG}/src/config.RemoteProjectName=${PROJ_NAME} ⚡' \
-s -w"
ifeq ($(OS),Windows_NT)
EXT=.exe

View File

@ -12,12 +12,14 @@ import (
)
var (
Version = "undefined"
Commit = "undefined"
Date = "undefined"
CheckForUpdates = "false"
License = "Apache-2.0"
Discord = "https://discord.gg/S4xgmRSHdC"
Version = "undefined"
Commit = "undefined"
Date = "undefined"
CheckForUpdates = "false"
License = "Apache-2.0"
Discord = "https://discord.gg/S4xgmRSHdC"
ProjectName = "Process Compose 🔥"
RemoteProjectName = "Process Compose ⚡"
scFiles = []string{
"shortcuts.yaml",

View File

@ -33,9 +33,9 @@ func (pv *pcView) createStatTable() *tview.Table {
func (pv *pcView) getPcTitle() string {
if pv.project.IsRemote() {
return "Process Compose ⚡"
return config.RemoteProjectName
} else {
return "Process Compose 🔥"
return config.ProjectName
}
}