Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
core
tarantool
Commits
d1a689b8
Commit
d1a689b8
authored
11 years ago
by
Konstantin Osipov
Browse files
Options
Downloads
Plain Diff
Merge branch 'out-of-git-version-stable' into stable
parents
099557af
e4b73eea
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
CMakeLists.txt
+33
-11
33 additions, 11 deletions
CMakeLists.txt
with
34 additions
and
11 deletions
.gitignore
+
1
−
0
View file @
d1a689b8
...
...
@@ -86,3 +86,4 @@ test/unit/bit_test
test/unit/bitset_basic_test
test/unit/bitset_index_test
test/unit/bitset_iterator_test
VERSION
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
33
−
11
View file @
d1a689b8
...
...
@@ -106,21 +106,43 @@ add_custom_target(TAGS COMMAND ctags -R --langmap=ObjectiveC:.m -e -f TAGS
#
# Define PACKAGE_VERSION -- a string constant with tarantool version.
#
set
(
PACKAGE_VERSION
""
)
execute_process
(
COMMAND
${
GIT
}
describe HEAD
OUTPUT_VARIABLE PACKAGE_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
#
# Make sure the version is set even if building
# out of source.
#
set
(
CPACK_PACKAGE_VERSION_MAJOR
"1"
)
set
(
CPACK_PACKAGE_VERSION_MINOR
"4"
)
set
(
CPACK_PACKAGE_VERSION_PATCH
"9"
)
set
(
PACKAGE_VERSION
""
)
# Get git version only if source directory has .git repository, this
# avoids git to search .git repository in parent
# directories.
#
if
(
EXISTS
"
${
CMAKE_SOURCE_DIR
}
/.git"
)
execute_process
(
COMMAND
${
GIT
}
describe HEAD
OUTPUT_VARIABLE PACKAGE_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if
(
PACKAGE_VERSION STREQUAL
""
)
message
(
FATAL_ERROR
"Failed to retrive git version."
)
endif
()
endif
()
set
(
VERSION_FILE
"
${
CMAKE_BINARY_DIR
}
/VERSION"
)
# Update version file or use it when there is no git
# repository within sources (source tarballs).
#
if
(
PACKAGE_VERSION STREQUAL
""
)
set
(
PACKAGE_VERSION
"
${
CPACK_PACKAGE_VERSION_MAJOR
}
.
${
CPACK_PACKAGE_VERSION_MINOR
}
.
${
CPACK_PACKAGE_VERSION_PATCH
}
"
)
if
(
NOT EXISTS
"
${
VERSION_FILE
}
"
)
message
(
FATAL_ERROR
"Version file
${
VERSION_FILE
}
does not exists."
)
endif
()
message
(
WARNING
"Using version from version file
${
VERSION_FILE
}
"
)
execute_process
(
COMMAND
${
CAT
}
${
VERSION_FILE
}
OUTPUT_VARIABLE PACKAGE_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if
(
PACKAGE_VERSION STREQUAL
""
)
message
(
FATAL_ERROR
"Unable to retrive version from git or
${
VERSION_FILE
}
file."
)
endif
()
else
()
file
(
WRITE
${
VERSION_FILE
}
"
${
PACKAGE_VERSION
}
\n
"
)
endif
()
#
...
...
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