chore: Further tweaks to version string (#1895)
* fix: Only define SUFFIX if PR or BRANCH build Also, only define `VERSION_TAG` if VERSION_TAG exists. * fix: Omit GIT SHA for colorlcd also if a tagged build
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@
|
|||||||
const char vers_stamp[] = "VERS" TAB ": Factory firmware (" GIT_STR ")";
|
const char vers_stamp[] = "VERS" TAB ": Factory firmware (" GIT_STR ")";
|
||||||
#else
|
#else
|
||||||
#if defined(VERSION_TAG)
|
#if defined(VERSION_TAG)
|
||||||
const char vers_stamp[] = "VERS" TAB ": " VERSION_TAG DISPLAY_VERSION " (" GIT_STR ")";
|
const char vers_stamp[] = "VERS" TAB ": " VERSION_TAG DISPLAY_VERSION;
|
||||||
#else
|
#else
|
||||||
const char vers_stamp[] = "VERS" TAB ": " VERSION "-" VERSION_SUFFIX DISPLAY_VERSION " (" GIT_STR ")";
|
const char vers_stamp[] = "VERS" TAB ": " VERSION "-" VERSION_SUFFIX DISPLAY_VERSION " (" GIT_STR ")";
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
#define TIME "@TIME@"
|
#define TIME "@TIME@"
|
||||||
#define VERSION "@VERSION@"
|
#define VERSION "@VERSION@"
|
||||||
#define VERSION_SUFFIX "@VERSION_SUFFIX@"
|
#define VERSION_SUFFIX "@VERSION_SUFFIX@"
|
||||||
#if defined(VERSION_TAG)
|
#cmakedefine VERSION_TAG "@VERSION_TAG@"
|
||||||
#define VERSION_TAG "@VERSION_TAG@"
|
|
||||||
#endif
|
|
||||||
#define CODENAME "@CODENAME@"
|
#define CODENAME "@CODENAME@"
|
||||||
|
|
||||||
#define VERSION_MAJOR @VERSION_MAJOR@
|
#define VERSION_MAJOR @VERSION_MAJOR@
|
||||||
|
|||||||
+1
-1
@@ -58,7 +58,7 @@ elif [[ $gh_type = "pull" ]]; then
|
|||||||
# pull: refs/pull/<pr_number>/merge
|
# pull: refs/pull/<pr_number>/merge
|
||||||
gh_pull_number=PR$(echo "$GITHUB_REF" | awk -F / '{print $3}')
|
gh_pull_number=PR$(echo "$GITHUB_REF" | awk -F / '{print $3}')
|
||||||
export EDGETX_VERSION_SUFFIX=$gh_pull_number
|
export EDGETX_VERSION_SUFFIX=$gh_pull_number
|
||||||
else
|
elif [[ $gh_type = "heads" ]]; then
|
||||||
# heads: refs/heads/<branch_name>
|
# heads: refs/heads/<branch_name>
|
||||||
gh_branch=${GITHUB_REF##*/}
|
gh_branch=${GITHUB_REF##*/}
|
||||||
export EDGETX_VERSION_SUFFIX=$gh_branch
|
export EDGETX_VERSION_SUFFIX=$gh_branch
|
||||||
|
|||||||
Reference in New Issue
Block a user