Github user aledsage commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/678#discussion_r31716722
--- Diff: 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
--- End diff --
I'm not sure if this is working.
I created a test file:
```
1.2.0-SNAPSHOT # MY_VERSION
some text
1.2.0-SNAPSHOT
some more text
# MY_VERSION
1.2.0-SNAPSHOT
blah
1.2.0-SNAPSHOT
# MY_VERSION
```
And I ran `$BROOKLYN_REPO/usage/scripts/change-version.sh MY 1.2.0-SNAPSHOT
1.2.0-CHANGED`.
The output file was:
```
1.2.0-CHANGED # MY_VERSION
some text
1.2.0-SNAPSHOT
some more text
# MY_VERSION
1.2.0-SNAPSHOT
blah
1.2.0-SNAPSHOT
# MY_VERSION
```
i.e. it didn't change it on the line after "# MY_VERSION".
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---