diff --git a/tools/build-system/launch-build-machine.sh b/tools/build-system/launch-build-machine.sh index 83c31644a948c74c8e849738b0e7702b8bb40894..ebaa0ac48c673187aaf5274ca339d2ab7d35647a 100755 --- a/tools/build-system/launch-build-machine.sh +++ b/tools/build-system/launch-build-machine.sh @@ -7,7 +7,7 @@ # Author: Julien Bonjean (julien@bonjean.info) # # Creation Date: 2009-04-20 -# Last Modified: 2009-05-28 17:59:14 -0400 +# Last Modified: 2009-05-28 18:30:17 -0400 ##################################################### # @@ -62,7 +62,6 @@ PACKAGING_RESULT_DIR=${ROOT_DIR}/packages-${TAG} USER="sflphone" RELEASE_MODE= -VERSION_APPEND= SNAPSHOT_TAG=`date +%s` @@ -198,11 +197,8 @@ echo if [ ${RELEASE_MODE} ]; then echo "Release mode : ${RELEASE_MODE}" - if [ "${RELEASE_MODE}" != "release" ];then - VERSION_APPEND="~${RELEASE_MODE}" - fi else - echo "Snapshot mode" + echo "Snapshot mode : ${SNAPSHOT_TAG}" fi ######################### @@ -226,14 +222,23 @@ if [ ${DO_PREPARE} ]; then fi VERSION=`cd ${REPOSITORY_DIR} && git describe --tag HEAD | cut -d "/" -f2 | cut -d "-" -f1` - + + if [ ${RELEASE_MODE} ]; then + if [ "${RELEASE_MODE}" != "release" ];then + VERSION="${VERSION}~${RELEASE_MODE}" + fi + else + VERSION="${VERSION}-snapshot-${SNAPSHOT_TAG}" + fi + echo "Version is : ${VERSION}" + # if push is activated if [ ${DO_PUSH} ];then # first changelog generation for commit echo "Update debian changelogs (1/2)" - ${SCRIPTS_DIR}/sfl-git-dch.sh ${SNAPSHOT_TAG} ${RELEASE_MODE} + ${SCRIPTS_DIR}/sfl-git-dch.sh ${VERSION} ${RELEASE_MODE} if [ "$?" -ne "0" ]; then echo "!! Cannot update debian changelogs" @@ -241,12 +246,9 @@ if [ ${DO_PREPARE} ]; then fi echo " Doing commit" - VERSION_COMMIT=${VERSION}${VERSION_APPEND} - if [ ! ${RELEASE_MODE} ]; then - VERSION_COMMIT="${VERSION}-${SNAPSHOT_TAG}" - fi + cd ${REPOSITORY_DIR} - git commit -m "[#1262] Updated debian changelogs (${VERSION_COMMIT})" . >/dev/null + git commit -m "[#1262] Updated debian changelogs (${VERSION})" . >/dev/null echo " Pushing commit" git push origin master >/dev/null @@ -271,10 +273,10 @@ if [ ${DO_PREPARE} ]; then fi echo "Write version numbers for following processes" - echo "${VERSION_COMMIT}" > ${REPOSITORY_DIR}/sflphone-common/VERSION - echo "${VERSION_COMMIT}" > ${REPOSITORY_DIR}/sflphone-client-gnome/VERSION - echo "${VERSION_COMMIT}" > ${REPOSITORY_DIR}/sflphone-client-kde/VERSION - echo "${VERSION_COMMIT}" > ${TODEPLOY_BUILD_DIR}/VERSION + echo "${VERSION}" > ${REPOSITORY_DIR}/sflphone-common/VERSION + echo "${VERSION}" > ${REPOSITORY_DIR}/sflphone-client-gnome/VERSION + echo "${VERSION}" > ${REPOSITORY_DIR}/sflphone-client-kde/VERSION + echo "${VERSION}" > ${TODEPLOY_BUILD_DIR}/VERSION echo "Archiving repository" tar czf ${REPOSITORY_ARCHIVE} --exclude .git -C `dirname ${REPOSITORY_DIR}` sflphone diff --git a/tools/build-system/sfl-git-dch.sh b/tools/build-system/sfl-git-dch.sh index 9c83ae7a888a3e26131fe93dae188adf61aaa520..c6ea370334839e6de6dd566e98fe5ce066a1721d 100755 --- a/tools/build-system/sfl-git-dch.sh +++ b/tools/build-system/sfl-git-dch.sh @@ -7,12 +7,12 @@ # Author: Julien Bonjean (julien@bonjean.info) # # Creation Date: 2009-05-13 -# Last Modified: 2009-05-28 18:04:12 -0400 +# Last Modified: 2009-05-28 18:24:53 -0400 ##################################################### # set -x -SNAPSHOT_TAG=$1 +VERSION=$1 RELEASE_MODE=$2 ROOT_DIR="/home/projects/sflphone" @@ -83,28 +83,6 @@ if [ "$?" -ne "0" ]; then exit -1 fi -# get version -SOFTWARE_VERSION=`echo ${LAST_RELEASE_TAG_NAME} | cut -d "/" -f2- | cut -d "-" -f1` - -if [ "$?" -ne "0" ]; then - echo " !! Error when retrieving software version" - exit -1 -fi - -# add version info -SOFTWARE_VERSION_APPEND= -if [ ${RELEASE_MODE} ] -then - if [ "${RELEASE_MODE}" != "release" ]; then - SOFTWARE_VERSION_APPEND="~${RELEASE_MODE}" - fi -else - SOFTWARE_VERSION_APPEND="~snapshot${SNAPSHOT_TAG}" -fi - - - - # iterate throw changelog files for CHANGELOG_FILE in ${CHANGELOG_FILES[@]} do @@ -141,7 +119,7 @@ do if [ ${IS_FIRST} ] then - yes | dch --changelog ${CHANGELOG_FILE} -b --allow-lower-version --no-auto-nmu --distribution SYSTEM --newversion ${SOFTWARE_VERSION}${SOFTWARE_VERSION_APPEND}-SYSVER "$line" >/dev/null 2>&1 + yes | dch --changelog ${CHANGELOG_FILE} -b --allow-lower-version --no-auto-nmu --distribution SYSTEM --newversion ${VERSION}-SYSVER "$line" >/dev/null 2>&1 if [ "$?" -ne "0" ]; then echo @@ -164,13 +142,13 @@ do # add snapshot or release flag if needed echo if [ ${RELEASE_MODE} ]; then - sed -i "3i\ ** ${SOFTWARE_VERSION} ${RELEASE_MODE} **\n" ${CHANGELOG_FILE} + sed -i "3i\ ** ${VERSION} **\n" ${CHANGELOG_FILE} if [ "$?" -ne "0" ]; then echo " !! Error when adding snapshot flag" exit -1 fi else - sed -i "3i\ ** SNAPSHOT ${SNAPSHOT_TAG} **\n" ${CHANGELOG_FILE} + sed -i "3i\ ** SNAPSHOT ${VERSION} **\n" ${CHANGELOG_FILE} if [ "$?" -ne "0" ]; then echo " !! Error when adding snapshot flag" exit -1