Skip to content

Commit

Permalink
[cmake] Fix distsrc script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel-Naumann authored and dpiparo committed Apr 30, 2024
1 parent 1c87896 commit 5a7516d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ add_custom_target(version COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/build
endif()

#---distribution commands------------------------------------------------------------------------
add_custom_target(distsrc COMMAND ${CMAKE_SOURCE_DIR}/build/unix/makedistsrc.sh "${ROOT_FULL_VERSION}" "${GIT_DESCRIBE_ALWAYS}" "${CMAKE_SOURCE_DIR}")
add_custom_target(distsrc COMMAND ${CMAKE_SOURCE_DIR}/build/unix/makedistsrc.sh "${ROOT_FULL_VERSION}" "${CMAKE_SOURCE_DIR}")
add_custom_target(dist COMMAND cpack --config CPackConfig.cmake)

#---Configure and install various files neded later and for clients -----------------------------
Expand Down
10 changes: 6 additions & 4 deletions build/unix/makedistsrc.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#! /bin/sh

FILEVERS=$1
GITTAG=$2
ROOTSRCDIR=$3
ROOTSRCDIR=$2

# FILEVERS is M.mm.pp, GITTAG must be M-mm-pp
GITTAG=`echo $FILEVERS | tr '.' '-'`
TARFILE=root_v$FILEVERS.source.tar

rm -f ../$TARFILE ../${TARFILE}.gz
cd $ROOTSRCDIR \
&& git archive -v -o ../$TARFILE --prefix=root-$FILEVERS/ $GITTAG \
&& gzip $TARFILE
&& git archive -v -o ../$TARFILE --prefix=root-$FILEVERS/ v$GITTAG \
&& gzip ../$TARFILE

0 comments on commit 5a7516d

Please sign in to comment.