From 19ad14ada4c932718719b92d7d941a179bdacf4f Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Nov 02 2015 07:35:29 +0000 Subject: fix(fedpkg): fix the build when fedpkg does not allow build from srpm --- diff --git a/ChangeLog b/ChangeLog index 335e8f5..94725da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -* Mon Nov 02 2015 Ding-Yi Chen - 2.4.0 +* Mon Nov 02 2015 Ding-Yi Chen - 2.4.1 - Enhancement: * cmake-fedora-pkgdb: New script: pkgdb helper script. * cmake-fedora-zanata: New script: zanata helper script. @@ -496,4 +496,4 @@ just showing it. - Fixed changelog_update. * Mon Oct 04 2010 Ding-Yi Chen - 0.1.0 -- Initial package. \ No newline at end of file +- Initial package. diff --git a/Modules/ManageVersion.cmake b/Modules/ManageVersion.cmake index a894d87..8b731e5 100644 --- a/Modules/ManageVersion.cmake +++ b/Modules/ManageVersion.cmake @@ -126,7 +126,6 @@ FUNCTION(RELEASE_NOTES_READ_FILES_VARIABLES releaseNoteFile ) BREAK() ELSEIF(NOT "${_line}" MATCHES "^\\s*#") SETTING_STRING_GET_VARIABLE(var value "${_line}") - MESSAGE("var=${var} value=${value}") IF("${var}" STREQUAL "PRJ_VER") SET_COMPILE_ENV(${var} "${value}" CACHE STRING "Project Version" FORCE) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 6690f65..fd837c7 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,4 +1,4 @@ -PRJ_VER=2.4.0 +PRJ_VER=2.4.1 SUMMARY=cmake-fedora-zanata REDHAT_BUGZILLA=1194797 [Changes] diff --git a/scripts/cmake-fedora-fedpkg b/scripts/cmake-fedora-fedpkg index 0cf164d..3168667 100755 --- a/scripts/cmake-fedora-fedpkg +++ b/scripts/cmake-fedora-fedpkg @@ -180,15 +180,13 @@ function fedpkg_build(){ else ## Real build if [[ "$gitBranch" = "$firstBranch" ]];then - local target=`$CMakeFedoraKojiCmd target $gitBranch` - try_command $FEDPKG_CMD build --target $target --srpm "$Srpm" "$@" - if [[ $GitNeedBranch -eq 1 ]];then - cd "$Name" - try_command $GIT_CMD stash - try_command $GIT_CMD fetch - try_command $FEDPKG_CMD switch-branch $gitBranch - try_command $FEDPKG_CMD pull - fi + try_command $GIT_CMD stash + try_command $GIT_CMD fetch + try_command $FEDPKG_CMD switch-branch $gitBranch + try_command $FEDPKG_CMD pull + try_command $FEDPKG_CMD import "$Srpm" + try_command $FEDPKG_CMD push + try_command $FEDPKG_CMD build else try_command $FEDPKG_CMD switch-branch $gitBranch try_command $GIT_CMD merge $firstBranch @@ -370,7 +368,7 @@ else GitNeedMerge=0 fi -if [[ $GitNeedMerge -eq 1 ]];then +if [[ $ScratchBuild -eq 0 ]];then if [[ ! -w "$WorkDir" ]];then if ! mkdir -p "$WorkDir"; then echo "$WorkDir is not writable." > /dev/stderr @@ -383,6 +381,7 @@ if [[ $GitNeedMerge -eq 1 ]];then try_command $FEDPKG_CMD clone "$Name" fi echo "WorkDir=$WorkDir" > /dev/stderr + cd "Name" fi ##=== Build ===