You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by neykov <gi...@git.apache.org> on 2015/01/23 14:50:37 UTC

[GitHub] incubator-brooklyn pull request: Make change-versions.sh more resi...

GitHub user neykov opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/467

    Make change-versions.sh more resilient.

    * files with spaces
    * fail-fast
    * no matching files case

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/neykov/incubator-brooklyn change-version-spaces

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/467.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #467
    
----
commit fc678ab5211a5b7197b7ea8ecf0101b565b5b7b0
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Date:   2015-01-23T13:05:49Z

    Make change-versions.sh more resilient.
    
    Support files with spaces, fail-fast, no matching files case.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Make change-versions.sh more resi...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-brooklyn/pull/467


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Make change-versions.sh more resi...

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/467#issuecomment-71227562
  
    Looks good. Merging.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Make change-versions.sh more resi...

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/467#discussion_r23464075
  
    --- Diff: usage/scripts/change-version.sh ---
    @@ -45,16 +47,24 @@ VERSION_MARKER_NL=${VERSION_MARKER}_BELOW
     CURRENT_VERSION=$1
     NEW_VERSION=$2
     
    -# grep --exclude-dir working only in recent versions, not on all platforms, replace with find
    -# skip folders named "ignored" or .xxx (but not the current folder ".")
    -# exclude log, war, etc. files
    +# grep --exclude-dir working only in recent versions, not on all platforms, replace with find;
    +# skip folders named "ignored" or .xxx (but not the current folder ".");
    +# exclude log, war, etc. files;
    +# use null delimiters so files containing spaces are supported;
    +# pass /dev/null as the first file to search in, so the command doesn't fail if find doesn't match any files;
    +# add || true for the case where grep doesn't have matches, so the script doesn't halt
    +# If there's an error "Argument list too long" add -n20 to xargs arguments and loop over $FILE around sed
     FILES=`find . -type d \( -name ignored -or -name .?\* \) -prune \
    -       -o -type f -not \( -name \*.log -or -name '*.war' -or -name '*.min.js' -or -name '*.min.css' \) -print | \
    -       xargs grep -l "${VERSION_MARKER}\|${VERSION_MARKER_NL}"`
    +       -o -type f -not \( -name \*.log -or -name '*.war' -or -name '*.min.js' -or -name '*.min.css' \) -print0 | \
    +       xargs -0 grep -l "${VERSION_MARKER}\|${VERSION_MARKER_NL}" /dev/null || true`
    +
    +FILES_COUNT=`echo $FILES | wc | awk '{print $2}'`
    --- End diff --
    
    Could use `wc -l` or `wc -w`, rather than having the select the particular output. But no strong feelings.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---