brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rich...@apache.org
Subject [1/4] incubator-brooklyn git commit: Change version only on the line following the version tag
Date Thu, 04 Jun 2015 13:44:51 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master ba280a179 -> 7066d94e8


Change version only on the line following the version tag

Previously the script changed versions in the whole file, regardless of version tags.


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/9c5e8524
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/9c5e8524
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/9c5e8524

Branch: refs/heads/master
Commit: 9c5e8524ed76afaf5a59ff790d2d90e60b3b459e
Parents: 5dd08aa
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Thu Jun 4 12:52:08 2015 +0300
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Thu Jun 4 12:52:08 2015 +0300

----------------------------------------------------------------------
 usage/scripts/change-version.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/9c5e8524/usage/scripts/change-version.sh
----------------------------------------------------------------------
diff --git a/usage/scripts/change-version.sh b/usage/scripts/change-version.sh
index f9f7bc6..280c245 100755
--- a/usage/scripts/change-version.sh
+++ b/usage/scripts/change-version.sh
@@ -63,7 +63,7 @@ FILES_COUNT=`echo $FILES | wc | awk '{print $2}'`
 if [ ${FILES_COUNT} -ne 0 ]; then
     # search for files containing version markers
     sed -i.bak -e "/${VERSION_MARKER}/s/${CURRENT_VERSION}/${NEW_VERSION}/g" $FILES
-    sed -i.bak -e "/${VERSION_MARKER_NL}/n;s/${CURRENT_VERSION}/${NEW_VERSION}/g" $FILES
+    sed -i.bak -e "/${VERSION_MARKER_NL}/{n;s/${CURRENT_VERSION}/${NEW_VERSION}/g;}" $FILES
 fi
 
 echo "Changed ${CURRENT_VERSION} to ${NEW_VERSION} for "${FILES_COUNT}" files"


Mime
View raw message