Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Pope
ftl
Commits
a34448c1
Commit
a34448c1
authored
5 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Temp fix to git version parse problem
parent
4c2361f3
No related branches found
No related tags found
No related merge requests found
Pipeline
#10919
passed
5 years ago
Stage: all
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake/git_version.cmake
+11
-11
11 additions, 11 deletions
cmake/git_version.cmake
components/common/cpp/src/config.cpp.in
+6
-6
6 additions, 6 deletions
components/common/cpp/src/config.cpp.in
with
17 additions
and
17 deletions
cmake/git_version.cmake
+
11
−
11
View file @
a34448c1
...
...
@@ -11,19 +11,19 @@ if (Git_FOUND)
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string
(
REGEX REPLACE
"^v([0-9]+)
\\
..*"
"
\\
1"
ftl_VERSION_MAJOR
"
${
VERSION
}
"
)
string
(
REGEX REPLACE
"^v[0-9]+
\\
.([0-9]+).*"
"
\\
1"
ftl_VERSION_MINOR
"
${
VERSION
}
"
)
string
(
REGEX REPLACE
"^v[0-9]+
\\
.[0-9]+
\\
.([0-9]+).*"
"
\\
1"
ftl_VERSION_PATCH
"
${
VERSION
}
"
)
string
(
REGEX REPLACE
"^v[0-9]+
\\
.[0-9]+
\\
.[0-9]+-([0-9]+).*"
"
\\
1"
ftl_VERSION_COMMITS
"
${
VERSION
}
"
)
string
(
REGEX REPLACE
"^v[0-9]+
\\
.[0-9]+
\\
.[0-9]+-[0-9]+-(.*)"
"
\\
1"
ftl_VERSION_SHA1
"
${
VERSION
}
"
)
set
(
FTL_VERSION
"
\"
${
ftl_VERSION_MAJOR
}
.
${
ftl_VERSION_MINOR
}
.
${
ftl_VERSION_PATCH
}
\"
"
)
#
string(REGEX REPLACE "^v([0-9]+)\\..*" "\\1" ftl_VERSION_MAJOR "${VERSION}")
#
string(REGEX REPLACE "^v[0-9]+\\.([0-9]+).*" "\\1" ftl_VERSION_MINOR "${VERSION}")
#
string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" ftl_VERSION_PATCH "${VERSION}")
#
string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+-([0-9]+).*" "\\1" ftl_VERSION_COMMITS "${VERSION}")
#
string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+-[0-9]+-(.*)" "\\1" ftl_VERSION_SHA1 "${VERSION}")
#
set(FTL_VERSION "\"${ftl_VERSION_MAJOR}.${ftl_VERSION_MINOR}.${ftl_VERSION_PATCH}\"")
else
()
set
(
ftl_VERSION_MAJOR
"0"
)
set
(
ftl_VERSION_MINOR
"0"
)
set
(
ftl_VERSION_PATCH
"0"
)
set
(
FTL_VERSION
"
\"
${
ftl_VERSION_MAJOR
}
.
${
ftl_VERSION_MINOR
}
.
${
ftl_VERSION_PATCH
}
\"
"
)
set
(
VERSION
"unknown"
)
#
set(ftl_VERSION_MAJOR "0")
#
set(ftl_VERSION_MINOR "0")
#
set(ftl_VERSION_PATCH "0")
#
set(FTL_VERSION "\"${ftl_VERSION_MAJOR}.${ftl_VERSION_MINOR}.${ftl_VERSION_PATCH}\"")
message
(
WARNING
"Version could not be obtained from git"
)
...
...
This diff is collapsed.
Click to expand it.
components/common/cpp/src/config.cpp.in
+
6
−
6
View file @
a34448c1
#include <ftl/config.h>
const char *FTL_VERSION_LONG = "@VERSION@";
const char *FTL_VERSION =
@FTL_VERSION@
;
const int FTL_VERSION_MAJOR =
@ftl_VERSION_MAJOR@
;
const int FTL_VERSION_MINOR =
@ftl_VERSION_MINOR@
;
const int FTL_VERSION_PATCH =
@ftl_VERSION_PATCH@
;
const int FTL_VERSION_COMMITS =
@ftl_VERSION_COMMITS@
;
const char *FTL_VERSION_SHA1 = "
@ftl_VERSION_SHA1@
";
const char *FTL_VERSION =
""
;
const int FTL_VERSION_MAJOR =
0
;
const int FTL_VERSION_MINOR =
0
;
const int FTL_VERSION_PATCH =
0
;
const int FTL_VERSION_COMMITS =
0
;
const char *FTL_VERSION_SHA1 = "";
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment