Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
Inkscape
inkscape
Commits
7811297f
Commit
7811297f
authored
Jun 30, 2017
by
Marc Jeanmougin
🔧
Browse files
Fix revno with git
parent
e4ed7cef
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
7811297f
...
...
@@ -152,21 +152,22 @@ endif()
# Dist Target
# -----------------------------------------------------------------------------
if
(
EXISTS
${
CMAKE_SOURCE_DIR
}
/.git/
)
execute_process
(
COMMAND
git describe
execute_process
(
COMMAND git show --format=format:
"%ad %h"
--date=short
COMMAND head -n 1
COMMAND tr
"
\n
"
" "
OUTPUT_VARIABLE INKSCAPE_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
else
()
set
(
INKSCAPE_REVISION
"unknown"
)
endif
()
set
(
INKSCAPE_DIST_PREFIX
"
${
PROJECT_NAME
}
-
${
INKSCAPE_VERSION
}
"
)
#add_custom_target(dist
# COMMAND sed -i "s/unknown/r${INKSCAPE_REVISION}/" CMakeScripts/inkscape-version.cmake
# && sed -i "s/custom//" CMakeScripts/inkscape-version.cmake
# && bzr export --uncommitted --root=${INKSCAPE_DIST_PREFIX}
# "${CMAKE_BINARY_DIR}/${INKSCAPE_DIST_PREFIX}.tar.bz2"
# && bzr revert ${CMAKE_SOURCE_DIR}/CMakeScripts/inkscape-version.cmake
# WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
add_custom_target
(
dist
COMMAND sed -i
"s/unknown//"
CMakeScripts/inkscape-version.cmake
&& sed -i
"s/custom//"
CMakeScripts/inkscape-version.cmake
&& tar cfz
${
CMAKE_BINARY_DIR
}
/
${
INKSCAPE_DIST_PREFIX
}
.tar.gz
${
CMAKE_SOURCE_DIR
}
--exclude=
".*"
--exclude-vcs-ignores
&& git checkout
${
CMAKE_SOURCE_DIR
}
/CMakeScripts/inkscape-version.cmake
WORKING_DIRECTORY
"
${
CMAKE_SOURCE_DIR
}
"
)
# -----------------------------------------------------------------------------
# Uninstall Target
...
...
CMakeScripts/inkscape-version.cmake
View file @
7811297f
...
...
@@ -12,10 +12,18 @@ set(INKSCAPE_REVISION "unknown")
set
(
INKSCAPE_CUSTOM
"custom"
)
if
(
EXISTS
${
INKSCAPE_SOURCE_DIR
}
/.git/
)
execute_process
(
COMMAND
git describe
${
INKSCAPE_SOURCE_DIR
}
OUTPUT_VARIABLE INKSCAPE_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process
(
COMMAND git describe
COMMAND tr
"
\n
"
" "
WORKING_DIRECTORY
${
INKSCAPE_SOURCE_DIR
}
OUTPUT_VARIABLE INKSCAPE_REV1
)
execute_process
(
COMMAND git show --format=format:%ad --date=short
COMMAND head -n 1
COMMAND tr
"
\n
"
" "
WORKING_DIRECTORY
${
INKSCAPE_SOURCE_DIR
}
OUTPUT_VARIABLE INKSCAPE_REV2
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set
(
INKSCAPE_REVISION
${
INKSCAPE_REV1
}
${
INKSCAPE_REV2
}
)
execute_process
(
COMMAND
git status -s
${
INKSCAPE_SOURCE_DIR
}
/src
...
...
Marc Jeanmougin
🔧
@marcjeanmougin
mentioned in commit
c7b8642b
·
Mar 24, 2018
mentioned in commit
c7b8642b
mentioned in commit c7b8642bb62bbd4de6983c48e31e42c50a4e8001
Toggle commit list
Marc Jeanmougin
🔧
@marcjeanmougin
mentioned in commit
c7b8642b
·
Mar 24, 2018
mentioned in commit
c7b8642b
mentioned in commit c7b8642bb62bbd4de6983c48e31e42c50a4e8001
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment