Skip to content
This repository
Browse code

CPack: avoid tagging packages with git rev-parse. ie: it is failing i…

…f the tarball is downloaded instead of git-cloning
  • Loading branch information...
commit bdab413a2a9a06d07316bf6503fd4635fc1dc260 1 parent 9216525
Oscar Martinez omf authored

Showing 1 changed file with 9 additions and 8 deletions. Show diff stats Hide diff stats

  1. +9 8 CMakeLists.txt
17 CMakeLists.txt
@@ -125,7 +125,7 @@ ${${RESULT}})
125 125 ${${RESULT}})
126 126 ELSE (WIN32)
127 127 MESSAGE(SEND_ERROR "date not implemented")
128   - SET(${RESULT} 000000)
  128 + SET(${RESULT} 00.00.0000)
129 129 ENDIF (WIN32)
130 130 ENDMACRO (TODAY)
131 131
@@ -135,19 +135,20 @@ STRING(SUBSTRING ${CMD_DATE} 3 2 CMD_DATE_MON)
135 135 STRING(SUBSTRING ${CMD_DATE} 6 4 CMD_DATE_YEAR)
136 136 SET(CMD_DATE "${CMD_DATE_YEAR}.${CMD_DATE_MON}.${CMD_DATE_DAY}")
137 137
138   -IF(WIN32 AND NOT CYGWIN)
139   - execute_process(COMMAND "cmd" " /C git rev-parse --short HEAD" OUTPUT_VARIABLE IO_GIT_REV)
140   -ELSE(WIN32 AND NOT CYGWIN)
141   - execute_process(COMMAND git rev-parse --short HEAD OUTPUT_VARIABLE IO_GIT_REV)
142   -ENDIF(WIN32 AND NOT CYGWIN)
143   -string(REGEX REPLACE "(.......)." "\\1" IO_GIT_REV ${IO_GIT_REV})
  138 +# If source tree is not a git repository this will not work
  139 +#IF(WIN32 AND NOT CYGWIN)
  140 +# execute_process(COMMAND "cmd" " /C git rev-parse --short HEAD" OUTPUT_VARIABLE IO_GIT_REV)
  141 +#ELSE(WIN32 AND NOT CYGWIN)
  142 +# execute_process(COMMAND git rev-parse --short HEAD OUTPUT_VARIABLE IO_GIT_REV)
  143 +#ENDIF(WIN32 AND NOT CYGWIN)
  144 +#string(REGEX REPLACE "(.......)." "\\1" IO_GIT_REV ${IO_GIT_REV})
144 145
145 146 SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
146 147 SET(CPACK_PACKAGE_VENDOR "iolanguage.com")
147 148 SET(CPACK_PACKAGE_CONTACT "iolanguage@yahoogroups.com")
148 149 SET(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/license/bsd_license.txt)
149 150 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Io Language")
150   -SET(CPACK_PACKAGE_VERSION "${CMD_DATE}_${IO_GIT_REV}")
  151 +SET(CPACK_PACKAGE_VERSION "${CMD_DATE}")
151 152 SET(CPACK_PACKAGE_VERSION_MAJOR ${CMD_DATE_YEAR})
152 153 SET(CPACK_PACKAGE_VERSION_MINOR ${CMD_DATE_MON})
153 154 SET(CPACK_PACKAGE_VERSION_PATCH ${CMD_DATE_DAY})

0 comments on commit bdab413

Please sign in to comment.
Something went wrong with that request. Please try again.