Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
c55d51b3
Commit
c55d51b3
authored
Sep 20, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow git-less configuration of release version
parent
ee359ebd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
34 deletions
+46
-34
CMakeLists.txt
CMakeLists.txt
+36
-34
scripts/get-release-version.sh
scripts/get-release-version.sh
+10
-0
No files found.
CMakeLists.txt
View file @
c55d51b3
...
@@ -599,11 +599,12 @@ endif()
...
@@ -599,11 +599,12 @@ endif()
# -- Fetch branch name and SHA if available ------------------------------------
# -- Fetch branch name and SHA if available ------------------------------------
find_package
(
Git QUIET
)
if
(
EXISTS
"release.txt"
)
file
(
READ
"release.txt"
CAF_VESION
)
set
(
CAF_RELEASE
"
${
CAF_VERSION
}
"
)
else
()
set
(
CAF_RELEASE
"
${
CAF_VERSION
}
"
)
if
(
GIT_FOUND
)
find_package
(
Git QUIET
)
if
(
GIT_FOUND
)
# retrieve current branch name for CAF
# retrieve current branch name for CAF
execute_process
(
COMMAND
${
GIT_EXECUTABLE
}
rev-parse --abbrev-ref HEAD
execute_process
(
COMMAND
${
GIT_EXECUTABLE
}
rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
...
@@ -636,6 +637,7 @@ if(GIT_FOUND)
...
@@ -636,6 +637,7 @@ if(GIT_FOUND)
endif
()
endif
()
endif
()
endif
()
endif
()
endif
()
endif
()
endif
()
endif
()
message
(
STATUS
"Set release version for all documentation to
${
CAF_RELEASE
}
."
)
message
(
STATUS
"Set release version for all documentation to
${
CAF_RELEASE
}
."
)
...
...
scripts/get-release-version.sh
0 → 100755
View file @
c55d51b3
#!/bin/sh
grep
"define CAF_VERSION"
libcaf_core/caf/config.hpp |
awk
'{printf "%d.%d.%d", int($3 / 10000), int($3 / 100) % 100, $3 % 100}'
>
version.txt
git rev-parse
--abbrev-ref
HEAD
>
branch.txt
git log
--pretty
=
format:%h
-n
1
>
sha.txt
if
test
"
$(
cat
branch.txt
)
= master"
&&
git describe
--tags
--contains
$(
cat
sha.txt
)
1>tag.txt 2>/dev/null
;
then
cp
tag.txt release.txt
else
printf
"%s"
"
$(
cat
version.txt
)
+exp.sha.
$(
cat
sha.txt
)
"
>
release.txt
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment